CVE-2026-55071 MCP-for-Stata: Stata Command Injection via Unsanitized `package` in `ado_package_install`
Attackers can execute arbitrary OS commands by injecting newlines into the package argument of the ado_package_install tool in the Stata MCP server.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2026-55071?
CVE-2026-55071 is a high-severity command injection vulnerability in SepineTam mcp-for-stata, published on 21 Sep 2026. It can only be exploited from the same machine or local network, with no action from the victim.
Official 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.
Weakness: CWE-94
Which versions are affected by CVE-2026-55071?
3 open source packages ship an affected version, including stata-mcp.
| Package | Affected | Fixed in |
|---|---|---|
stata-mcp PyPI | All versions | 1.19.0 |
stata-mcp PyPI | All versions | 1.19.0 |
stata-mcp PyPI | All versions | 1.19.0 |
How do I fix CVE-2026-55071?
Upgrade stata-mcp to 1.19.0 or later.
Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.
Is CVE-2026-55071 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-55071 exists.
Sources
Also known as GHSA-49m4-vp58-wgc9, PYSEC-2026-3700.