CVE-2025-12695: dspy · Improper Isolation or Compartmentalization
Affects dspySource CVE Database V5
Not known to be exploited · CVSS 5.9 Medium.
Data as of 26 Oct 2026, 06:26 UTC
- EPSS
- 0.3% chance of exploitation in 30 days – higher than 26% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:NExploitation evidence
Disclosed: evidence found.
CVE published 4 Nov 2025
Detectable: no evidence on record.
No public nuclei template indexed
Weaponised: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 2026-10-26.
What to do
Affected software
| Product | Affected | Fixed in |
|---|---|---|
PyPIdspypkg:pypi/dspyOther threats | Affected
| Fixed in– |
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
To mitigate CVE-2025-12695, organizations should first audit their use of DSPy, especially AI agents that utilize the PythonInterpreter class. They should implement strict sandbox configurations that enforce least privilege and isolate interpreter execution environments to prevent unauthorized file system access. Employ containerization or virtual machines to further compartmentalize AI agent processes. Restrict or disable the use of PythonInterpreter in scenarios where user input is consumed unless absolutely necessary and secure. Monitor file access logs and sandbox escape attempts for suspicious activity. Apply network segmentation to limit exposure of AI development environments. Engage with DSPy maintainers for patches or updates addressing this vulnerability. Additionally, conduct regular security reviews of AI development pipelines and educate developers on secure sandboxing practices. If possible, implement runtime application self-protection (RASP) techniques to detect and block exploitation attempts in real-time.
Description
The overly permissive sandbox configuration in DSPy allows attackers to steal sensitive files in cases when users build an AI agent which consumes user input and uses the “PythonInterpreter” class.