Vulnerabilities in pkg:pypi/langsmith

PACKAGE
Advisory Summary

GHSA-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.

4 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:pypi/langsmith

4 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:pypi/langsmith. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-f4xh-w4cj-qxq8 - HIGH LangSmith SDK TracingMiddleware: Arbitrary server-side file read
GHSA-3644-q5cj-c5c7 CVE-2026-45134 HIGH LangSmith SDK: Public prompt pull deserializes untrusted manifests without trust boundary warning
GHSA-rr7j-v2q5-chgv CVE-2026-41182 MODERATE LangSmith SDK: Streaming token events bypass output redaction
GHSA-v34v-rq6j-cj6p CVE-2026-25528 MODERATE LangSmith Client SDK Affected by Server-Side Request Forgery via Tracing Header Injection

GHSA-f4xh-w4cj-qxq8 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-f4xh-w4cj-qxq8
Severity HIGH
CVSS v3.1 Base Score 7.7
CWE Classification CWE-843: Access of Resource Using Incompatible Type ('Type Confusion')
Affected Product LangSmith SDK TracingMiddleware
Package Ecosystem PyPI
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity None (I:N)
Availability None (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.

langsmith fixed: 0.8.18
pip install langsmith>=0.8.18
Verify Direct and Transitive Dependencies

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

# 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 - Anyone reachable by HTTP can trigger the file read. Depending on how the distributed trace system is deployed, triggering may not require authentication. - 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. # 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.

GHSA-f4xh-w4cj-qxq8 Affected LangSmith SDK TracingMiddleware Versions

1 component(s)
Fixed Versions:
0.8.18
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?
GHSA-f4xh-w4cj-qxq8 is a security vulnerability in LangSmith SDK TracingMiddleware involving Arbitrary server-side file read under CWE-843: Access of Resource Using Incompatible Type ('Type Confusion').
Which LangSmith SDK TracingMiddleware versions are affected?
Affected versions include releases prior to 0.8.18 across affected packages: langsmith.
What version fixes GHSA-f4xh-w4cj-qxq8?
Upgrading to 0.8.18 (or the latest patched release for your respective branch) resolves the vulnerability.
Is langsmith affected?
Yes, langsmith is affected in releases prior to 0.8.18. Upgrade your dependency to 0.8.18 or later.
What is the CVSS score of GHSA-f4xh-w4cj-qxq8?
GHSA-f4xh-w4cj-qxq8 has a CVSS v3.1 base score of 7.7 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:N/A:N.
What CWE is associated with GHSA-f4xh-w4cj-qxq8?
GHSA-f4xh-w4cj-qxq8 is classified under CWE-843: Access of Resource Using Incompatible Type ('Type Confusion') (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.).
How can I check PyPI dependencies for GHSA-f4xh-w4cj-qxq8?
Run the dependency tree command: 'pip show langsmith'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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
  }
}