Skip to main content
← All vulnerabilities
CVE-2026-47708PYSEC-2026-544GHSA-4P62-HQP5-G644

MCP-for-Stata: Command injection via log_file_name parameter in Stata command wrapper

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 1.17.3
None on Exploit-DB, Metasploit or GitHub
  • Exploitation: poc
  • Automatable: yes
  • Technical impact: total

Summary

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.

Timeline

  1. CVE published
  2. CISA SSVC assessment

    Exploitation: poc · Automatable: yes · Technical impact: total

  3. Record last updated

Affected versions

  • SepineTam stata-mcp

    fixed in 1.17.3

  • stata-mcpPyPI

    fixed in 1.17.3

References 3

GitHub · SepineTam/mcp-for-stata