Skip to main content
EPSS 0.3%top 85%

Stata mcp: MCP-for-Stata: Stata Command Injection via Unsanitized `package` in `ado_package_install` (CVE-2026-55071)

0
High
Published: 09/21/2026 (09/21/2026, 14:09:30 UTC)
Source: GCVE Database
Product: stata-mcp

Description

MCP-for-Stata is a MCP server for integrating Stata into agent loops with a safety-first design. Prior to version 1.19.0, the ado_package_install MCP tool in stata-mcp concatenates user-controlled input directly into a Stata command string without any validation or sanitization. An attacker who can invoke the MCP tool or the equivalent Python API can embed newline characters in the package argument to inject arbitrary Stata commands. Because Stata supports a shell escape command, this leads to full OS-level arbitrary command execution (RCE) under the account running the Stata-MCP server. The tool is registered in the default all profile, so no non-default configuration is required. This issue has been patched in version 1.19.0.

CVSS v3.1

Score 8.4high

Attack Vector
Local
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Affected software

PyPIghsa
stata-mcp
Affected versions
<1.19.0

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 09/21/2026, 22:15:42 UTC

Technical Analysis

MCP-for-Stata is a server tool integrating Stata into agent loops. In versions before 1.19.0, the ado_package_install MCP tool improperly handles the 'package' argument by concatenating it directly into a Stata command string without validation or sanitization. This allows an attacker who can invoke the MCP tool or its Python API to inject newline characters and arbitrary Stata commands. Since Stata supports shell escape commands, this injection leads to full OS-level remote code execution under the account running the Stata-MCP server. The tool is enabled by default in the all profile, requiring no special configuration to be vulnerable. The issue is tracked as CVE-2026-55071 and has a CVSS 3.1 score of 8.4 (high severity). A patch fixing this vulnerability was released in version 1.19.0.

Potential Impact

An attacker with the ability to invoke the vulnerable MCP tool or its API can execute arbitrary operating system commands with the privileges of the Stata-MCP server process. This can lead to full system compromise, data loss, or further lateral movement within the affected environment.

Mitigation Recommendations

A patch is available and should be applied by upgrading MCP-for-Stata to version 1.19.0 or later. This update properly sanitizes the 'package' argument to prevent command injection. No additional configuration changes are required since the vulnerable tool is enabled by default.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
GHSA-49m4-vp58-wgc9
Osv Schema Version
1.4.0
Aliases
["CVE-2026-55071"]
Ecosystems
["PyPI"]
Database Specific Severity
HIGH
Cvss Version
3.1

Threat ID: 6a7cd3debf8831d53917fb2a

Added to database: 08/12/2026, 20:13:18 UTC

Last enriched: 09/21/2026, 22:15:42 UTC

Last updated: 09/25/2026, 01:56:22 UTC

Views: 31

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses