External risk intelligence

DSPy Local File Read via Image and Audio Output Adapters

CVE advisorySeverity: CRITICAL (CVSS 9.2)

CVE-2026-72742

DSPy is a developer-facing framework/library used within code to build LLM applications. It is not an internet-facing service, appliance, or network gateway. The vulnerability involves how the library processes data within a developer's application logic, making it a build-time or internal library dependency issue rather than a component with public-facing network exposure.

Halo Surface Signal: 1 out of 5 — much less likely to be public-facing.

External exposure likelihood

Horizon Alert

Summary of the vulnerability and why it matters

A file exfiltration vulnerability has been identified in the DSPy framework that could allow unauthorized access to local files through specific output field adapters. This issue arises from how the framework parses language model outputs, potentially embedding sensitive file content into outgoing messages.

  • Unauthorized file reading is possible.
  • This impacts how developers build LLM applications.
  • Confirm relevance and scope to internal code.

Attack Path

How an attacker could exploit the issue

An attacker could exploit this vulnerability by influencing the output of a language model to include a file path. This file path, when processed by the Image and Audio output field adapters, allows the attacker to read arbitrary local files. The contents of these files are then base64-encoded and embedded into outgoing messages, potentially leading to sensitive information disclosure.

  • Unauthenticated network access
  • Injecting file path into output
  • Sensitive file exfiltration

Live Threat

Current exploitation, exposure, and threat context

Attackers who can influence language model outputs could exploit a file exfiltration vulnerability in DSPy's Image and Audio output field adapters. This could allow them to read arbitrary local files by injecting a filesystem path into the URL field of parsed Image or Audio typed output. The vulnerability occurs when the JSONAdapter and ChatAdapter parse untrusted language model completions, triggering functions that read and base64-encode local file paths. The contents of these files could then be embedded into outgoing prompt messages sent to an attacker-controlled model endpoint.

  • Arbitrary local files.
  • Injecting filesystem path into output.
  • Exfiltration of sensitive file contents.

Operational Fix

Recommended remediation, mitigation, and detection steps

This vulnerability affects the DSPy library, likely managed by development or platform engineering teams responsible for AI/ML model integrations. The immediate first step is to identify all instances where DSPy is used within applications or services, then confirm their reachability and business criticality to prioritize remediation efforts with the accountable application owners.

  • Identify DSPy application owners.
  • Verify DSPy library usage and reachability.
  • Plan DSPy upgrade or mitigation.

Supplementary metadata

Validate whether this threat affects your internet-facing exposure.

Halo Threat Intelligence helps prioritize remediation with Halo Surface Signal and H/A/L/O context. Start exposure validation with a free external attack surface trial.

Frequently asked questions

What is DSPy?

DSPy is a software framework and library designed for developers building applications that integrate with large language models. It helps manage prompts and model interactions through code. It is not an independent service or appliance, but a dependency included directly within the custom software applications or data pipelines built by developers.

How does CVE-2026-72742 allow file reading?

This vulnerability is classified as CWE-73, or External Control of File Name or Path. The framework's Image and Audio output adapters take input from a language model and attempt to parse it. If an attacker influences the model to output a file path, the library mistakenly treats that path as a valid asset, reads the local file, and encodes its contents into a message.

What conditions trigger this vulnerability?

The vulnerability requires the application to process untrusted language model output using the affected JSONAdapter or ChatAdapter. The bug triggers only when the output contains a specific path that the library attempts to process as an image or audio file. Simply using DSPy for standard text-based tasks or processing trusted data does not trigger this file reading behavior.

Is my application at risk from this CVE?

According to Halo Surface Signal, this is very unlikely to be an internet-facing risk. DSPy is a library used within internal code, not a public-facing service. If your application processes completions from a language model that an unauthorized party can influence, you should evaluate whether your implementation uses the vulnerable image or audio parsing components.

How should I respond to this vulnerability?

Start by identifying which internal applications or services include the DSPy library. Once identified, consult with the development teams managing those applications to verify if they utilize the Image or Audio output field adapters. If they do, coordinate with the appropriate application owners to plan an upgrade to a version of the framework where this parsing logic is secured.

References