Advisory

PYSEC-2026-1318

Also known as: CVE-2025-12695, GHSA-vvw2-h478-xwr3

Summary

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.

Severity

Medium Basis: CVSS v3 score 5.9, vector CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N

Dates

Published
2026-07-07 16:03 UTC
Modified
2026-07-07 17:46 UTC

Affected packages and fixes

dspy

PyPI · All systems

Affected

  • introduced 0, last affected 3.0.3 (ecosystem)

Fixed versions

None listed

Fix

No fixed version is listed.

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: PyPA Advisory Database · CC BY 4.0

Sources & licences