CVE-2026-47708 Details
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.
A command injection vulnerability has been identified in MCP-for-Stata, a server application that integrates Stata into an agent. The issue arises in versions prior to 1.17.3, where the log_file_name parameter in the stata_do API and CLI is interpolated into a Stata command string without proper sanitization. This oversight allows attackers to inject arbitrary Stata commands, such as shell or Python commands, by crafting a malicious log_file_name that includes quotes, newlines, or Stata command separators. The vulnerability also bypasses the application's security guard, which only scans the content of do-files but does not validate command parameters.
Users should update to MCP-for-Stata version 1.17.3 or later, where this vulnerability has been patched. The patch includes validation for the log_file_name parameter to prevent command injection by rejecting untrusted characters and path traversal attempts.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Jul 21, 2026CISA-ADP
Assessed Jul 22, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/SepineTam/mcp-for-stata/security/advisories/GHSA-4p62-hqp5-g644 | CISA-ADP | AdvisoryRemedyVendor |
| https://github.com/SepineTam/mcp-for-stata/commit/e6f945941ae0c7cf5e74a428e0b3dc82b396382f | [email protected] | Source CodeVendor |
| https://github.com/SepineTam/mcp-for-stata/issues/74 | [email protected] | ExploitIssue TrackingTechnical DescriptionVendor |
| https://github.com/SepineTam/mcp-for-stata/security/advisories/GHSA-4p62-hqp5-g644 | [email protected] | AdvisoryRemedyVendor |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-77 | Improper Neutralization of Special Elements used in a Command ('Command Injection') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| SepineTam MCP-for-Stata | < 1.17.3 (semver) |
CPE
Remediation
| |
Change History
2 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jul 22, 2026 | CVE Modified | CISA-ADP |
| Jul 21, 2026 | New CVE Received | [email protected] |
Volerion