Description
DSPy 3.3.0b1 contains a file exfiltration vulnerability in the Image and Audio output field adapters that allows attackers with influence over language model outputs to read arbitrary local files by injecting a filesystem path into the url field of a parsed Image or Audio typed output. The JSONAdapter and ChatAdapter parse untrusted language model completions through parse_value into TypeAdapter validation, which triggers encode_image or encode_audio to read and base64-encode any local file path via the os.path.isfile branch in image.py and audio.py, subsequently embedding the file contents into outgoing prompt messages sent to the attacker-controlled model endpoint.
Published: 2026-08-11
Score: 9.2 Critical
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

DSPy 3.3.0b1 allows an attacker who can influence language model outputs to read arbitrary local files on the host. The vulnerability is triggered when a malicious model supplies an Image or Audio output where the url field contains a filesystem path. During parsing, the adapters validate the output and invoke encode_image or encode_audio, which checks os.path.isfile and if true, reads the file and base64‑encodes its contents. The file data is then embedded in prompt messages that are sent back to the attacker‑controlled model endpoint, exposing local files without authorization. The weakness is a classic Local File Read (CWE‑73) and can leak sensitive data from the VM or host where DSPy runs.

Affected Systems

The vulnerability exists only in Stanford NLP’s DSPy 3.3.0b1. No other DSPy versions or products are listed as affected.

Risk and Exploitability

The CVSS score of 9.2 indicates a high severity impact, while the EPSS score of <1% suggests a low current exploitation probability. The vulnerability is not listed in the CISA KEV catalog. The attack requires an attacker who can control or predict the language model’s output, meaning the threat surface is limited to trusted or compromised model endpoints. If such influence is achieved, the attacker can read any file in the DSPy process’s file system via the parsing component.

Generated by OpenCVE AI on August 12, 2026 at 20:28 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade to the latest DSPy release that resolves the file read issue as released by Stanford NLP.
  • If an upgrade is not immediately possible, configure the Image and Audio adapters to reject or sanitize any url field that points to a local filesystem path before validation is performed.
  • Restrict the model endpoint so that only authenticated, authorized users can generate outputs that are parsed by DSPy, thereby limiting the ability of attackers to influence output generation.

Generated by OpenCVE AI on August 12, 2026 at 20:28 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Thu, 13 Aug 2026 10:15:00 +0000

Type Values Removed Values Added
First Time appeared Stanford Nlp
Stanford Nlp dspy
Vendors & Products Stanford Nlp
Stanford Nlp dspy

Wed, 12 Aug 2026 18:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Tue, 11 Aug 2026 19:00:00 +0000

Type Values Removed Values Added
Description DSPy 3.3.0b1 contains a file exfiltration vulnerability in the Image and Audio output field adapters that allows attackers with influence over language model outputs to read arbitrary local files by injecting a filesystem path into the url field of a parsed Image or Audio typed output. The JSONAdapter and ChatAdapter parse untrusted language model completions through parse_value into TypeAdapter validation, which triggers encode_image or encode_audio to read and base64-encode any local file path via the os.path.isfile branch in image.py and audio.py, subsequently embedding the file contents into outgoing prompt messages sent to the attacker-controlled model endpoint.
Title DSPy 3.3.0b1 Local File Read via Image/Audio Output Field Parsing
Weaknesses CWE-73
References
Metrics cvssV3_1

{'score': 8.6, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N'}

cvssV4_0

{'score': 9.2, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:H/SI:N/SA:N'}


Subscriptions

Stanford Nlp Dspy
cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-08-12T16:58:19.991Z

Reserved: 2026-08-10T13:53:42.482Z

Link: CVE-2026-72742

cve-icon Vulnrichment

Updated: 2026-08-12T16:05:25.647Z

cve-icon NVD

Status : Received

Published: 2026-08-11T19:18:49.130

Modified: 2026-08-12T17:17:31.593

Link: CVE-2026-72742

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-13T09:49:37Z

Weaknesses
  • CWE-73

    External Control of File Name or Path