Skip to main content

Stata Mcp EUVDEUVD-2026-20475

| CVE-2026-31040 CRITICAL
Code Injection (CWE-94)
2026-04-08 cve@mitre.org GHSA-jpcj-7wfg-mqxv
9.8
CVSS 3.1 · Vendor: mitre
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Send malicious Stata do-file to MCP server
  2. Exploit
    Parser processes file without validation
  3. Execution
    Arbitrary commands execute in Stata context
  4. Impact
    Full system compromise achieved

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Code injection prevention, sandbox exec
MITRE ATT&CK

2 techniques across 2 tactics: Execution, Initial Access

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Remote unauthenticated attacker can exploit stata-mcp versions prior to v1.13.0 by sending a crafted Stata do-file with malicious commands. The vulnerable server must accept and execute user-supplied do-file content without proper validation. No victim interaction required.

Impact

Critical CVSS 9.8 reflects unauthenticated network-accessible remote code execution via malicious Stata do-files. However, EPSS at 0.02% indicates low observed exploitation activity, suggesting limited real-world adoption or exploitation barriers. Patch availability and academic/niche tool scope mitigate blast radius despite severe technical severity.

Exploit ScenarioDerived

Attacker crafts malicious Stata do-file with injected commands; user/system processes file through stata-mcp without sanitization, executing arbitrary code with application privileges. No authentication required due to AV:N/PR:N. No public exploit identified at time of analysis.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Apr 08, 2026

Remote code execution via command injection in stata-mcp versions before 1.13.0 allows unauthenticated attackers to execute arbitrary commands through insufficiently validated Stata do-file content. The vulnerability stems from CWE-94 improper control of code generation, enabling network-accessible exploitation without user interaction. CVSS 9.8 (Critical) reflects complete compromise of confidentiality, integrity, and availability. No public exploit identified at time of analysis; low observed exploitation activity (EPSS 0.02%, percentile 6%).

RemediationAI

Vendor-released patch: upgrade to stata-mcp v1.13.0 immediately, available at https://github.com/SepineTam/stata-mcp/releases/tag/v1.13.0. Version 1.13.0 addresses the command injection vulnerability via commit 52413ce (https://github.com/SepineTam/stata-mcp/commit/52413ce) and PR #21 (https://github.com/SepineTam/stata-mcp/pull/21). No workarounds provide equivalent protection; upgrading is mandatory. Identify all instances processing untrusted do-file content and prioritize patching internet-facing deployments. If immediate upgrade is infeasible, discontinue processing external do-file input until patched. Vulnerability details: https://nvd.nist.gov/vuln/detail/CVE-2026-31040 and https://github.com/SepineTam/stata-mcp/issues/20.

Affected VersionsENISA

n/a n/a

Affected Packages

pypi stata-mcp fix: 1.13.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in pypi

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

CWE-94 code injection flaw in stata-mcp's do-file parser permits attacker-controlled input to be interpreted as executable commands. CVSS vector AV:N/AC:L/PR:N indicates remotely exploitable with low complexity and no authentication barrier. Vulnerable code inadequately sanitizes user-supplied Stata script content before execution, creating command injection surface.

Know when Stata Mcp gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (mitre) PRIMARY 9.8 CRITICAL
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Primary rating from Vendor (mitre) · only source for this CVE.

CVSS VectorVendor: mitre

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

2
Patch released
Apr 09, 2026 - 02:30 nvd
Patch available
CVE Published
Apr 08, 2026 - 16:16 nvd
CRITICAL 9.8

DescriptionCVE.org

A vulnerability was identified in stata-mcp prior to v1.13.0 where insufficient validation of user-supplied Stata do-file content can lead to command execution.

Executive ViewAI

Why It Matters

CVE-2026-31040 is a critical remote code execution vulnerability in stata-mcp that allows unauthenticated attackers to execute arbitrary commands on systems running vulnerable versions. This affects any organization using stata-mcp for data analysis or statistical workflows, potentially compromising confidential data, analysis integrity, and system availability without requiring user interaction or authentication.

Business Impact: Severe
Compensating Controls

Apply vendor patch to version 1.13.0 or later. If immediate patching is not feasible, implement network segmentation to restrict unauthenticated access to stata-mcp services and disable network-accessible Stata do-file processing until patch is applied.

Threat Intelligence Overview

EPSS Score
0.0%
Top 94% exploitable
Threat Intel
1
1 source
Data Quality
6 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Out-of-Cycle
Exploitation
Poc
System Exposure· derived
Open
Automatable
Yes
Human Impact
Very High
Technical Impact
Total

Priority Score

49
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +49
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Code Injection CRITICAL

Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.

Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy