Intel

AIKIDO-2026-431839

dspy is vulnerable to Arbitrary File Read

Arbitrary File ReadCVE-2026-72742 Published Aug 12, 2026

86

High Risk

This Affects:

PYTHONdspy
0.0.1 - 3.2.1
Fixed in 3.3.0
Are you affected? Scan for Free

TL;DR

The dspy chat and JSON adapters parse untrusted language model completions into dspy.Image and dspy.Audio typed output fields during validation. When a completion supplies a filesystem path in the url field, the type constructor reaches the os.path.isfile branch in image.py and audio.py, reads that local file, and base64-encodes it. The encoded contents are then embedded into the next outgoing prompt sent to the model endpoint, so any entity that can influence model output can read and exfiltrate arbitrary local files. The fix makes resource construction and validation free of implicit filesystem and network access and requires explicit factory methods to load local or remote resources.

Who does this affect?

You are affected if you are using a version that falls within the vulnerable range and you use signatures with dspy.Image or dspy.Audio output fields whose values are parsed from untrusted language model output.

Background info

dspy is vulnerable to Arbitrary File Read in versions 0.0.1 - 3.2.1.

How to fix this

Upgrade the dspy library to the patch version.