CVE-2026-47708 MCP-for-Stata: Command injection via log_file_name parameter in Stata command wrapper
CriticalCVSS 9.3
EPSS 0.38%
- Published
- Updated
- Exploit status
- No public exploit known
- CISA SSVC
- Proof of concept public · automatable: yes · technical impact: total
Description
MCP-for-Stata is an MCP server for Stata to integrate Stata into an agent. Prior to version 1.17.3, the log_file_name parameter in the stata_do API and CLI is directly interpolated into a Stata command string without sanitization. The security guard (GuardValidator) only scans the do-file content but does not validate this parameter. An attacker can inject arbitrary Stata commands (including shell, python, erase, etc.) by crafting a malicious log_file_name containing quotes, newlines, or Stata command separators. Version 1.17.3 contains a patch for the issue.
Upgrade path
2 packages: 1 fixed.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| pypi stata-mcp(PyPI) | < 1.17.3; = 0.1.0; = 1.3.2; = 1.3.3 +88 more | 1.17.3 | Fixed |
| SepineTam stata-mcp | = < 1.17.3 | No fix listed | Versions listed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| SepineTam stata-mcp | = < 1.17.3 | No fix listed |
| pypi stata-mcp(PyPI) | < 1.17.3 | 1.17.3 |
| pypi stata-mcp(PyPI) | = 0.1.0 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.10.0 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.10.1 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.10.2 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.11.0 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.11.1 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.12.0 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.12.1 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.13.0 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.13.1 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.13.10 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.13.11 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.13.12 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.13.13 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.13.14 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.13.15 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.13.16 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.13.17 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.13.18 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.13.19 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.13.2 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.13.20 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.13.21 | No fix listed |
Show 68 more
| Product | Affected versions | Fixed in |
|---|---|---|
| pypi stata-mcp(PyPI) | = 1.13.22 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.13.23 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.13.24 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.13.25 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.13.26 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.13.27 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.13.28 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.13.29 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.13.3 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.13.30 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.13.31 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.13.32 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.13.33 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.13.34 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.13.35 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.13.36 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.13.37 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.13.38 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.13.39 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.13.4 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.13.40 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.13.41 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.13.42 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.13.5 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.13.6 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.13.7 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.13.8 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.13.9 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.14.0 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.14.1 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.14.2 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.14.3 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.15.0 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.15.1 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.16.0 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.16.1 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.16.2 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.16.3 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.17.0 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.17.1 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.17.2 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.3.10 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.3.2 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.3.3 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.3.4 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.3.5 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.3.6 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.3.7 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.3.8 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.4.0 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.4.1 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.5.1 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.5.2 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.5.3 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.6.0 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.6.1 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.6.2 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.6.3 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.7.0 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.7.1 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.7.2 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.7.3 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.7.4 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.8.0 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.8.1 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.8.2 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.9.0 | No fix listed |
| pypi stata-mcp(PyPI) | = 1.9.1 | No fix listed |
References
- https://github.com/SepineTam/mcp-for-stata/security/advisories/GHSA-4p62-hqp5-g644 exploit
- https://github.com/SepineTam/mcp-for-stata/issues/74
- https://github.com/SepineTam/mcp-for-stata/commit/e6f945941ae0c7cf5e74a428e0b3dc82b396382f patch
- github.com vendor-advisory
- github.com product
- pypi.org product
- github.com vendor-advisory
- nvd.nist.gov vendor-advisory