CVE-2026-59152: LangSmith SDK: arbitrary file read via TracingMiddleware

MEDIUM
Published July 6, 2026
CISO Take

LangSmith's client SDKs ship a TracingMiddleware that, before version 0.8.18, can be tricked by a crafted HTTP request into reading any file on the local filesystem of the instrumented server and silently uploading it to LangSmith as a trace attachment. This matters because the initial file read may require no authentication at all depending on deployment, and the blast radius is significant — the langsmith-sdk package has 2,872 downstream dependents and an OpenSSF Scorecard of just 5.8/10, with 56 other CVEs already recorded against the package family. The real danger is the trust-boundary crossing: any workspace member with trace-read access — a low-privilege teammate, a contractor, or a compromised account — can then simply open the trace and read out .env files, credentials, or config data that were never meant to leave the server. EPSS sits low (0.00174) and there's no public exploit, KEV listing, or scanner template yet, so this is not an emergency, but any team running LangSmith-instrumented services should patch to langsmith-sdk 0.8.18 and audit who currently holds trace-read permissions in their LangSmith workspaces.

Sources: NVD GitHub Advisory EPSS CISA KEV OpenSSF ATLAS

What is the risk?

CVSS 5.0 (medium) reflects a network-exploitable, low-complexity, low-privilege issue with no user interaction (AV:N/AC:L/PR:L/UI:N) but limited confidentiality-only impact (C:L/I:N/A:N) and a changed scope (S:C) capturing the fact that the read happens on the target server while disclosure happens via the LangSmith workspace. Exploitability is currently low in practice: EPSS is 0.00174, there is no known public exploit code, no Nuclei template, and the CVE is not in CISA KEV. The realistic risk driver isn't opportunistic internet scanning — it's insider/authorization risk, since a party who already has legitimate but limited access (workspace trace-read) can escalate that access into full file-read capability on any server running the vulnerable middleware. Given the package's large dependent base (2,872) and mediocre supply-chain health signal (Scorecard 5.8/10, 56 prior CVEs), organizations that deployed TracingMiddleware without realizing it accepted unauthenticated trace-generating requests should treat this as higher priority than the raw CVSS suggests.

How does the attack unfold?

Initial Access
Attacker sends a crafted HTTP request to a server running LangSmith SDK's TracingMiddleware, exploiting a path-traversal flaw with little or no authentication required.
AML.T0049
Local File Collection
The vulnerable middleware reads an arbitrary file from the server's local filesystem in response to the crafted request.
AML.T0037
Exfiltration to LangSmith
The file contents are automatically uploaded to the LangSmith platform as a trace attachment, moving the data outside the server's trust boundary.
AML.T0025
Trust-Boundary Crossing / Impact
A workspace member with trace-read access — potentially a low-privilege teammate, contractor, or compromised account — opens the trace and retrieves the exfiltrated file contents, gaining a capability outside their intended access scope.

What systems are affected?

Package Ecosystem Vulnerable Range Patched
LangChain pip No patch
144.8K OpenSSF 5.9 3.0K dependents Pushed 4d ago 24% patched ~209d to patch Full package profile →

Do you use LangChain? You're affected.

How severe is it?

CVSS 3.1
5.0 / 10
EPSS
0.2%
chance of exploitation in 30 days
Higher than 10% of all CVEs
Exploitation Status
No known exploitation
Sophistication
Moderate

What is the attack surface?

AV AC PR UI S C I A
AV Network
AC Low
PR Low
UI None
S Changed
C Low
I None
A None

What should I do?

1 step
  1. Upgrade langsmith-sdk to 0.8.18 or later immediately on any server that enables TracingMiddleware. Until patched, restrict network reachability to services running TracingMiddleware (place behind authentication/VPN/allow-list rather than exposing it to the open internet) and treat any endpoint accepting trace ingestion as untrusted input. Separately, audit LangSmith workspace membership and reduce trace-read access to only those who need it, since the secondary trust-boundary crossing depends entirely on who can view trace attachments — remove contractor/former-employee access promptly. For detection, review recent trace attachments for unexpected file content (e.g., contents resembling /etc/passwd, .env files, or cloud credential files) and monitor for anomalous inbound requests to tracing endpoints preceding unexpected attachment uploads.

What does CISA's SSVC say?

Decision Track
Exploitation none
Automatable No
Technical Impact partial

Source: CISA Vulnrichment (SSVC v2.0). Decision based on the CISA Coordinator decision tree.

How is it classified?

Which compliance frameworks are affected?

This CVE is relevant to:

EU AI Act
Article 15 - Accuracy, robustness and cybersecurity
NIST AI RMF
MEASURE 2.7 - AI system security and resilience are evaluated and documented
OWASP LLM Top 10
LLM02 - Sensitive Information Disclosure

Frequently Asked Questions

What is CVE-2026-59152?

LangSmith's client SDKs ship a TracingMiddleware that, before version 0.8.18, can be tricked by a crafted HTTP request into reading any file on the local filesystem of the instrumented server and silently uploading it to LangSmith as a trace attachment. This matters because the initial file read may require no authentication at all depending on deployment, and the blast radius is significant — the langsmith-sdk package has 2,872 downstream dependents and an OpenSSF Scorecard of just 5.8/10, with 56 other CVEs already recorded against the package family. The real danger is the trust-boundary crossing: any workspace member with trace-read access — a low-privilege teammate, a contractor, or a compromised account — can then simply open the trace and read out .env files, credentials, or config data that were never meant to leave the server. EPSS sits low (0.00174) and there's no public exploit, KEV listing, or scanner template yet, so this is not an emergency, but any team running LangSmith-instrumented services should patch to langsmith-sdk 0.8.18 and audit who currently holds trace-read permissions in their LangSmith workspaces.

Is CVE-2026-59152 actively exploited?

No confirmed active exploitation of CVE-2026-59152 has been reported, but organizations should still patch proactively.

How to fix CVE-2026-59152?

Upgrade langsmith-sdk to 0.8.18 or later immediately on any server that enables TracingMiddleware. Until patched, restrict network reachability to services running TracingMiddleware (place behind authentication/VPN/allow-list rather than exposing it to the open internet) and treat any endpoint accepting trace ingestion as untrusted input. Separately, audit LangSmith workspace membership and reduce trace-read access to only those who need it, since the secondary trust-boundary crossing depends entirely on who can view trace attachments — remove contractor/former-employee access promptly. For detection, review recent trace attachments for unexpected file content (e.g., contents resembling /etc/passwd, .env files, or cloud credential files) and monitor for anomalous inbound requests to tracing endpoints preceding unexpected attachment uploads.

What systems are affected by CVE-2026-59152?

This vulnerability affects the following AI/ML architecture patterns: agent frameworks, LLM observability/tracing pipelines, RAG pipelines, model serving.

What is the CVSS score for CVE-2026-59152?

CVE-2026-59152 has a CVSS v3.1 base score of 5.0 (MEDIUM). The EPSS exploitation probability is 0.20%.

What is the AI security impact?

Affected AI Architectures

agent frameworksLLM observability/tracing pipelinesRAG pipelinesmodel serving

MITRE ATLAS Techniques

AML.T0025 Exfiltration via Cyber Means
AML.T0037 Data from Local System
AML.T0049 Exploit Public-Facing Application

Compliance Controls Affected

EU AI Act: Article 15
NIST AI RMF: MEASURE 2.7
OWASP LLM Top 10: LLM02

What are the technical details?

Original Advisory

LangSmith Client SDKs provide SDK's for interacting with the LangSmith platform. Prior to 0.8.18, 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. This vulnerability is fixed in 0.8.18.

Exploitation Scenario

An attacker sends a crafted HTTP request containing a path-traversal payload to a public-facing service that has LangSmith's TracingMiddleware enabled; in permissive deployments this requires no authentication at all. The vulnerable middleware reads an arbitrary local file — for example a .env file holding cloud or database credentials — and automatically uploads its contents to LangSmith as a trace attachment tied to that request. A second actor who already holds legitimate but limited access to the LangSmith workspace (a low-privilege teammate, outside contractor, or an account compromised through unrelated means) then simply browses recent traces and opens the attachment, retrieving the exfiltrated file contents without needing to touch the target server directly — effectively laundering a server-side file read through a trust boundary the workspace access model was never meant to cross.

Weaknesses (CWE)

CWE-22 — Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'): The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.

  • [Implementation] Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does. When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as "red" or "blue." Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylis
  • [Architecture and Design] For any security checks that are performed on the client side, ensure that these checks are duplicated on the server side, in order to avoid CWE-602. Attackers can bypass the client-side checks by modifying values after the checks have been performed, or by changing the client to remove the client-side checks entirely. Then, these modified values would be submitted to the server.

Source: MITRE CWE corpus.

CVSS Vector

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:L/I:N/A:N

Timeline

Published
July 6, 2026
Last Modified
July 7, 2026
First Seen
July 6, 2026

Related Vulnerabilities