# CVE-2026-55071: stata-mcp Command Injection in ado_package_install

Source: https://junglewise.ai/threats/cve-2026-55071-stata-mcp-command-injection-in-ado-package-install  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-09-21. Updated: 2026-08-12  
License: CC BY 4.0 with a link back

CVE-2026-55071 · Severity: high · CVSS 8.4 · Published 2026-09-21

A vulnerability in the stata-mcp tool allows an attacker to execute arbitrary operating system commands on the server running the software. This tool is used to integrate Stata, a statistical software package, with other applications. An exploit could lead to full system compromise, unauthorized access to sensitive data, and the ability to use the server for further attacks.

Technologies: [stata-mcp (PyPI)](https://junglewise.ai/threats/technologies/stata-mcp). Vendors: [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2026-55071 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-55071 being exploited in the wild.

**How severe is CVE-2026-55071?** High severity, with a CVSS score of 8.4, published 21 September 2026.

**Which products and versions are affected?** stata-mcp (PyPI) < 1.19.0, ECOSYSTEM:introduced=0,fixed=1.19.0.

**Is there a fix for CVE-2026-55071?** Yes. stata-mcp (PyPI): upgrade to 1.19.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-55071 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-55071?** Check whether you run stata-mcp (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- stata-mcp (PyPI): upgrade to 1.19.0 or later

  ```sh
  pip install "stata-mcp>=1.19.0"
  ```


## Technical details

The `ado_package_install` MCP tool in `stata-mcp` fails to sanitize the `package` argument before concatenating it into a Stata command string. Specifically, `SSC_Install.install()` interpolates user input into an f-string that is subsequently passed to the Stata REPL via `pexpect.sendline()`. An attacker can inject newline characters followed by Stata's `shell` or `!` commands to execute arbitrary OS-level commands. While a blacklist guard exists for dangerous commands, it is only applied to the `stata_do` path and does not protect the `ado-install` path. This vulnerability allows any principal capable of invoking the MCP tool—including AI agents or remote clients—to achieve Remote Code Execution (RCE) with the privileges of the Stata-MCP server process.

## Affected products

- stata-mcp stata-mcp

## Identifiers

- CVE-2026-55071
- GHSA-49m4-vp58-wgc9
- PYSEC-2026-3700

## Timeline

- 2026-08-12: advisory: Advisory published on GitHub

## References

- [https://api.github.com/users/EQSTLab](https://api.github.com/users/EQSTLab)
- [https://github.com/EQSTLab](https://github.com/EQSTLab)
- [https://api.github.com/users/EQSTLab/gists%7B/gist_id%7D](https://api.github.com/users/EQSTLab/gists%7B/gist_id%7D)
- [https://api.github.com/users/EQSTLab/repos](https://api.github.com/users/EQSTLab/repos)
- [https://avatars.githubusercontent.com/u/148991397?v=4](https://avatars.githubusercontent.com/u/148991397?v=4)
- [https://api.github.com/users/EQSTLab/events%7B/privacy%7D](https://api.github.com/users/EQSTLab/events%7B/privacy%7D)

## Related threats

- [SepineTam MCP-for-Stata command injection in log_file_name](https://junglewise.ai/threats/cve-2026-47708-sepinetam-mcp-for-stata-command-injection-in-log-file-name)
- [SepineTam stata-mcp code injection via Stata do-file shell-escape](https://junglewise.ai/threats/cve-2026-31040-sepinetam-stata-mcp-code-injection-via-stata-do-file-shell-escape)
