Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. dspy
  4. ›
  5. CVE-2025-12695

CVE-2025-12695: DSPy does not properly restrict file reads

November 4, 2025

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

  • github.com/advisories/GHSA-vvw2-h478-xwr3
  • github.com/stanfordnlp/dspy
  • nvd.nist.gov/vuln/detail/CVE-2025-12695
  • research.jfrog.com/vulnerabilities/dspy-sandbox-escape-arbitrary-file-read-jfsa-2025-001495652

Code Behaviors & Features

Detect and mitigate CVE-2025-12695 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions up to 3.0.3

Solution

Unfortunately, there is no solution available yet.

Impact 5.9 MEDIUM

CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N

Learn more about CVSS

Weakness

  • CWE-653: Improper Isolation or Compartmentalization

Source file

pypi/dspy/CVE-2025-12695.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 22 Nov 2025 00:18:41 +0000.