PyPA Advisory Database
PYSEC-2026-1318
DSPy does not properly restrict file reads
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.
Affected packages
| Ecosystem | Package | Affected versions |
|---|---|---|
| PyPI | dspy | All versions up to and including 3.0.3 |