# CVE-2026-31040: stata-mcp has insufficient validation of user-supplied Stata do-file content that can lead to command execution

- Severity: Critical 9.8 (CVSS:3.1, scored by CISA-ADP) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.58%, higher than 49% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-04-08T00:00:00.000Z
- Modified: 2026-07-25T10:10:00.167Z
- Also known as: GHSA-jpcj-7wfg-mqxv, PYSEC-2026-3076
- Weaknesses: CWE-20, CWE-94
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact total
- Assigned by: mitre

## Description

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.

(As written by CVE List.)

## Affected

- Unspecified product: n/a
- stata-mcp (PyPI): before 1.13.0
- statamcp stata-mcp: before 1.13.0

## Every score

- CISA-ADP: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- GitHub: CVSS:4.0 High `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N`
- PyPA Advisory Database: CVSS:4.0 `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N`

## References

- <https://github.com/SepineTam/stata-mcp/issues/20> (exploit, issue-tracking, vendor-advisory, web)
- <https://github.com/SepineTam/stata-mcp/pull/21> (issue-tracking, web)
- <https://github.com/SepineTam/stata-mcp/commit/52413ce> (patch, web)
- <https://github.com/SepineTam/stata-mcp/releases/tag/v1.13.0> (release-notes, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-31040> (advisory)
- <https://github.com/sepinetam/stata-mcp> (package)
- <https://pypi.org/project/stata-mcp> (package)
- <https://github.com/advisories/GHSA-jpcj-7wfg-mqxv> (advisory)

## Sources

- CVE List: [CVE-2026-31040](https://www.cve.org/CVERecord?id=CVE-2026-31040), CVE Terms of Use, modified 2026-04-09
- GitHub Advisory Database: [GHSA-jpcj-7wfg-mqxv](https://github.com/advisories/GHSA-jpcj-7wfg-mqxv), CC-BY-4.0, modified 2026-07-13
- NVD: [CVE-2026-31040](https://nvd.nist.gov/vuln/detail/CVE-2026-31040), Public domain, modified 2026-07-25
- PyPA Advisory Database: [PYSEC-2026-3076](https://osv.dev/vulnerability/PYSEC-2026-3076), CC-BY-4.0, modified 2026-07-13

---

Page: https://cve.day/CVE-2026-31040 · Whole record: https://cve.day/CVE-2026-31040.json · Rebuilt by cve.day 2026-11-25T22:59:18.284Z
