CVE-2026-41182: LangSmith SDK Streaming Token Events Bypass Output Vulnerability
MODERATECVE-2026-41182 is a MODERATE (CVSS 5.3) streaming token events bypass output vulnerability (CWE-532: Insertion of Sensitive Information into Log File) affecting LangSmith SDK libraries in the npm ecosystem. The issue involves streaming token events bypass output redaction. Remediation is available by upgrading affected packages to version 0.5.19, 0.7.31.
CVE-2026-41182 at a Glance
Security Impact
CVSS: 5.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N).
How to Fix CVE-2026-41182
To remediate this vulnerability, upgrade all affected LangSmith SDK dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
npm install langsmith@0.5.19
pip install langsmith>=0.7.31
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
npm ls langsmith
How to Check if You Are Affected
To determine whether your Node.js application is affected by CVE-2026-41182, inspect your project dependencies using npm:
npm ls langsmith
Analyze the terminal output to locate any version of LangSmith SDK in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.5.19), your application is affected.
Note: The npm ls langsmith command inspects dependencies declared in your package.json and lockfile; it does not perform automated runtime dynamic scanning.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-532: Insertion of Sensitive Information into Log File, where the product writes sensitive information to a log file. In LangSmith SDK, 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
CVE-2026-41182 Affected LangSmith SDK Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
langsmith
|
npm |
< 0.5.19
|
0.5.19
|
|
langsmith
|
PyPI |
< 0.7.31
|
0.7.31
|
References
Frequently Asked Questions
What is CVE-2026-41182?
Which LangSmith SDK versions are affected?
What version fixes CVE-2026-41182?
Is langsmith affected?
What is the CVSS score of CVE-2026-41182?
What CWE is associated with CVE-2026-41182?
How can I check npm dependencies for CVE-2026-41182?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-rr7j-v2q5-chgv",
"modified" : "2026-04-24T20:52:13Z",
"published" : "2026-04-16T01:20:37Z",
"aliases" : [ "CVE-2026-41182" ],
"summary" : "LangSmith SDK: Streaming token events bypass output redaction",
"details" : "## Summary\n\nThe LangSmith SDK's output redaction controls (hideOutputs in JS, hide_outputs in Python) do not apply to streaming token events. When an LLM run produces streaming output, each chunk is recorded as a new_token event containing the raw token value. These events bypass the redaction pipeline entirely — prepareRunCreateOrUpdateInputs (JS) and _hide_run_outputs (Python) only process the inputs and outputs fields on a run, never the events array. As a result, applications relying on output redaction to prevent sensitive LLM output from being stored in LangSmith will still leak the full streamed content via run events.\n\n## Details\n\n**Both JS and Python SDKs are affected.** The same pattern exists in both:\n\n- **JS SDK**: `traceable.ts:997-1003` and `traceable.ts:1044-1050`\n- **Python SDK**: `run_helpers.py:1924` and `run_helpers.py:1996`\n\nIn both SDKs, `new_token` events with raw `kwargs.token` values are added during streaming, and the redaction pipeline (`hideOutputs` in JS, `hide_outputs` in Python) only processes `inputs`/`outputs` — never `events`.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "npm",
"name" : "langsmith"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.5.19"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 0.5.18"
}
}, {
"package" : {
"ecosystem" : "PyPI",
"name" : "langsmith"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "0.7.31"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 0.7.30"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/langchain-ai/langsmith-sdk/security/advisories/GHSA-rr7j-v2q5-chgv"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-41182"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/langchain-ai/langsmith-sdk"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-200", "CWE-359", "CWE-532" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-04-16T01:20:37Z",
"nvd_published_at" : "2026-04-23T02:16:16Z"
}
}