{"id":"CVE-2026-47708","published":"2026-07-21T20:55:15Z","modified":"2026-07-22T15:10:36Z","title":"MCP-for-Stata: Command injection via log_file_name parameter in Stata command wrapper","vendor":"SepineTam","product":"stata-mcp","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":9.3,"severity":"CRITICAL","version":"4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00384,"percentile":0.3334,"provenance":"source"},"cwes":[{"id":"CWE-77","name":"Improper Neutralization of Special Elements used in a Command"}],"references":[{"url":"https://github.com/SepineTam/mcp-for-stata/security/advisories/GHSA-4p62-hqp5-g644","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/SepineTam/mcp-for-stata/issues/74","tags":["x_refsource_MISC"]},{"url":"https://github.com/SepineTam/mcp-for-stata/commit/e6f945941ae0c7cf5e74a428e0b3dc82b396382f","tags":["x_refsource_MISC"]}],"priority":{"score":13.2,"factors":[{"name":"EPSS percentile","points":6.67},{"name":"CVSS severity","points":6.51}]},"vendorSlug":"sepinetam","affectedVersions":[{"vendor":"SepineTam","product":"stata-mcp","versions":["< 1.17.3"]}],"ssvc":{"exploitation":"poc","automatable":"yes","technicalImpact":"total","timestamp":"2026-07-22T15:08:59.330180Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"stata-mcp","vulnerableRanges":["<1.17.3"],"patched":["1.17.3"],"from":["GHSA-4p62-hqp5-g644","PYSEC-2026-544"],"provenance":"source"}],"summary":{"text":"In stata-mcp, the MCP server that integrates Stata into an agent, the log_file_name parameter of the stata_do API and CLI is interpolated directly into a Stata command string without sanitization, and the security guard only scans do-file content, not this parameter. An attacker with network access can exploit this without authentication or user interaction by crafting a log_file_name containing quotes, newlines, or Stata command separators to run arbitrary Stata commands such as shell, python, or erase.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:39:48Z"},"euvd":{"id":"EUVD-2026-46426","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2026-31040","published":"2026-04-08","fixed":"1.13.0","kev":false,"link":{"from":"CVE-2026-31040","to":"CVE-2026-47708","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:stata-mcp","fromFixed":"1.13.0","toFixed":"1.17.3","daysApart":104}]}},{"cve":"CVE-2026-47708","published":"2026-07-21","fixed":"1.17.3","kev":false},{"cve":"CVE-2026-55071","published":"2026-09-21","fixed":"1.19.0","kev":false,"link":{"from":"CVE-2026-47708","to":"CVE-2026-55071","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:stata-mcp","fromFixed":"1.17.3","toFixed":"1.19.0","daysApart":62}]}}],"package":"PyPI:stata-mcp"}}