CVE-2026-72742: External Control of File Name or Path in Stanford NLP DSPy
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.
AI Analysis
Technical Summary
CVE-2026-72742 describes a critical vulnerability in Stanford NLP's DSPy 3.3.0b1 where the Image and Audio output field adapters improperly handle untrusted language model outputs. Specifically, the JSONAdapter and ChatAdapter parse these outputs through parse_value into TypeAdapter validation, which calls encode_image or encode_audio functions. These functions check if a given path is a file using os.path.isfile and then read and base64-encode the file contents. An attacker able to influence the language model output can inject arbitrary filesystem paths into the url field of Image or Audio typed outputs, causing local files to be read and exfiltrated within the outgoing prompt messages sent to the attacker-controlled model endpoint.
Potential Impact
This vulnerability allows remote attackers with the ability to influence language model outputs to read arbitrary local files on the system running DSPy 3.3.0b1. The attacker can exfiltrate sensitive data by embedding file contents into prompt messages sent to their controlled endpoint. The CVSS 4.0 score is 9.2 (critical), indicating a high-impact remote attack with no privileges or user interaction required and high confidentiality impact.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. No official fix or temporary mitigation is currently documented. Until a patch is available, restrict or monitor access to language model output influences and avoid running DSPy 3.3.0b1 in untrusted environments.
CVE-2026-72742: External Control of File Name or Path in Stanford NLP DSPy
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.
CVSS v4.0
Score 9.2critical
Affected software
Stanford NLP
DSPy
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-72742 describes a critical vulnerability in Stanford NLP's DSPy 3.3.0b1 where the Image and Audio output field adapters improperly handle untrusted language model outputs. Specifically, the JSONAdapter and ChatAdapter parse these outputs through parse_value into TypeAdapter validation, which calls encode_image or encode_audio functions. These functions check if a given path is a file using os.path.isfile and then read and base64-encode the file contents. An attacker able to influence the language model output can inject arbitrary filesystem paths into the url field of Image or Audio typed outputs, causing local files to be read and exfiltrated within the outgoing prompt messages sent to the attacker-controlled model endpoint.
Potential Impact
This vulnerability allows remote attackers with the ability to influence language model outputs to read arbitrary local files on the system running DSPy 3.3.0b1. The attacker can exfiltrate sensitive data by embedding file contents into prompt messages sent to their controlled endpoint. The CVSS 4.0 score is 9.2 (critical), indicating a high-impact remote attack with no privileges or user interaction required and high confidentiality impact.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. No official fix or temporary mitigation is currently documented. Until a patch is available, restrict or monitor access to language model output influences and avoid running DSPy 3.3.0b1 in untrusted environments.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- VulnCheck
- Date Reserved
- 2026-08-10T13:53:42.482Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 6a7b7426bf8831d539468001
Added to database: 08/11/2026, 19:12:38 UTC
Last enriched: 08/11/2026, 19:26:09 UTC
Last updated: 09/26/2026, 01:47:44 UTC
Views: 48
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.