INCIDENT MAP

Browse / Tool and Agent Misuse / CVE-2025-12695

DSPy does not properly restrict file reads

CVE-2025-12695 · 2025-11-04 moderate

Class
Tool and Agent Misuse (filed by a model that read the advisory)
Technique
Path traversal and file access
Also involves
Direct Prompt Injection
Affected
dspy (PyPI)
Gets past
Sandbox or allowlist
CVSS
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N
EPSS
0.3% chance of exploitation in 30 days

How it works, in short

The PythonInterpreter sandbox allows file reads beyond what it should, so agent code generated from user input can read sensitive host files. (Our summary, written by a model. The source text is below.)

Details

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.

References

Source: GitHub Advisory Database, used under CC BY 4.0.