INCIDENT MAP

Browse / AI Framework and Platform Flaws / CVE-2026-59152

LangSmith SDK TracingMiddleware: Arbitrary server-side file read

CVE-2026-59152 ยท 2026-06-19 high

Class
AI Framework and Platform Flaws (filed by a model that read the advisory)
Technique
Path traversal and file access
Affected
langsmith (PyPI)
Gets past
Input filter or sanitiser
CVSS
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N
EPSS
0.2% chance of exploitation in 30 days

How it works, in short

Header-supplied fields inject file attachments, and a broken type check fails to stop the tracing thread reading any server file the attacker names. (Our summary, written by a model. The source text is below.)

Details

Summary

An attacker who can send an HTTP request to a server running the LangSmith SDK's TracingMiddleware can cause that server to read an arbitrary file from its local filesystem and upload the contents to LangSmith as a trace attachment. Depending on how the distributed trace system is deployed, triggering a read may not require authentication. Retrieving the contents requires read access to the LangSmith workspace the traces are sent to. The net effect is a trust-boundary crossing: a party with workspace trace-read access (for example a low-privilege workspace member, a contractor, or a compromised teammate account) gains the ability to read files from any server running TracingMiddleware, a capability outside that workspace's intended trust boundary.

Impact

Confidentiality (High): arbitrary read of files accessible to the server process, exposed to anyone with workspace trace-read access.

Details

Two defects combine. A field supplied through a tracing-propagation header was merged into the run without validation, allowing injection of run attributes including attachments (CWE-346). A type check intended to gate filesystem access did not match the type of the decoded input, so the guard never engaged (CWE-843). As a result, an attacker-named file is opened by the server and uploaded as a trace attachment by the background tracing thread (CWE-22).

Who can exploit this

Remediation

Upgrade the Python SDK to >= 0.8.18.

Workarounds

Until upgrading, do not expose TracingMiddleware to untrusted HTTP traffic, and limit workspace trace-read access to trusted members.

Credits

First reported by @Ryu7zz.

References

Source: GitHub Advisory Database, used under CC BY 4.0.