Command Injection Affecting stata-mcp package, versions [,1.13.0)


Severity

Recommended
0.0
critical
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Command Injection vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-PYTHON-STATAMCP-14171919
  • published4 Dec 2025
  • disclosed2 Dec 2025
  • creditUnknown

Introduced: 2 Dec 2025

New CVE NOT AVAILABLE CWE-78  (opens in a new tab)

How to fix?

Upgrade stata-mcp to version 1.13.0 or higher.

Overview

stata-mcp is a Let LLM help you achieve your regression analysis with Stata

Affected versions of this package are vulnerable to Command Injection via the stata_do tool’s handling of Stata do-files. The server executes user-provided or LLM-generated do-files with subprocess.Popen(..., shell=True) and does not validate or sanitize their contents. Because Stata supports shell-escape directives such as !whoami, !ls, or shell curl ..., an attacker can embed arbitrary OS command escapes inside a do-file and have them executed on the host system, leading to remote code execution (RCE).

CVSS Base Scores

version 4.0
version 3.1