GHSA-f4xh-w4cj-qxq8: LangSmith SDK TracingMiddleware Arbitrary Server-side File Read Vulnerability
HIGHGHSA-f4xh-w4cj-qxq8 is a HIGH (CVSS 7.7) arbitrary server-side file read vulnerability (CWE-843: Access of Resource Using Incompatible Type ('Type Confusion')) affecting LangSmith SDK TracingMiddleware libraries in the PyPI ecosystem. The issue involves arbitrary server-side file read. Remediation is available by upgrading affected packages to version 0.8.18.
GHSA-f4xh-w4cj-qxq8 at a Glance
Security Impact
CVSS: 7.7
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N).
How to Fix GHSA-f4xh-w4cj-qxq8
To remediate this vulnerability, upgrade all affected LangSmith SDK TracingMiddleware dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install langsmith>=0.8.18
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show langsmith
How to Check if You Are Affected
To determine whether your Python environment is affected by GHSA-f4xh-w4cj-qxq8, inspect your installed packages using pip:
pip show langsmith
Analyze the terminal output to locate any version of LangSmith SDK TracingMiddleware in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.8.18), your application is affected.
Note: The pip show langsmith command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-843: Access of Resource Using Incompatible Type ('Type Confusion'), where the product allocates or initializes a resource such as a pointer, object, or variable using one type, but it later accesses that resource using a type that is incompatible with the original type. In LangSmith SDK TracingMiddleware, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-f4xh-w4cj-qxq8 Affected LangSmith SDK TracingMiddleware Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
langsmith
|
PyPI |
< 0.8.18
|
0.8.18
|
References
Frequently Asked Questions
What is GHSA-f4xh-w4cj-qxq8?
Which LangSmith SDK TracingMiddleware versions are affected?
What version fixes GHSA-f4xh-w4cj-qxq8?
Is langsmith affected?
What is the CVSS score of GHSA-f4xh-w4cj-qxq8?
What CWE is associated with GHSA-f4xh-w4cj-qxq8?
How can I check PyPI dependencies for GHSA-f4xh-w4cj-qxq8?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-f4xh-w4cj-qxq8",
"modified" : "2026-06-19T22:10:34Z",
"published" : "2026-06-19T22:10:34Z",
"aliases" : [ ],
"summary" : "LangSmith SDK TracingMiddleware: Arbitrary server-side file read",
"details" : "# Summary\n\nAn 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.\n\n# Impact\n\nConfidentiality (High): arbitrary read of files accessible to the server process, exposed to anyone with workspace trace-read access.\n\n# Details\n\nTwo 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).\n\n## Who can exploit this\n\n- Anyone reachable by HTTP can trigger the file read. Depending on how the distributed trace system is deployed, triggering may not require authentication.\n- Retrieving the file contents requires read access to the destination LangSmith workspace. The upload uses the server's own configured API key and workspace, which the attacker cannot redirect, so a zero-access outsider cannot retrieve the result; a workspace member, or anyone who has compromised one, can.\n\n# Remediation\n\nUpgrade the Python SDK to `>= 0.8.18`.\n\n# Workarounds\n\nUntil upgrading, do not expose `TracingMiddleware` to untrusted HTTP traffic, and limit workspace trace-read access to trusted members.\n\n# Credits\n\nFirst reported by @Ryu7zz.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "langsmith"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.8.18"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/langchain-ai/langsmith-sdk/security/advisories/GHSA-f4xh-w4cj-qxq8"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/langchain-ai/langsmith-sdk"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-22", "CWE-346", "CWE-843" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-06-19T22:10:34Z",
"nvd_published_at" : null
}
}