Vulnerability · Published Apr 23, 2026 · Assigned by GitHub_M
CVE-2026-41182LangSmith SDK: Streaming token events bypass output redaction
Medium 5.3
In plain English
A medium-severity information exposure in langsmith-sdk from langchain-ai. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 12% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
LangSmith Client SDKs provide SDK's for interacting with the LangSmith platform. Prior to version 0.5.19 of the JavaScript SDK and version 0.7.31 of the Python SDK, the 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. Version 0.5.19 of the JavaScript SDK and version 0.7.31 of the Python SDK fix the issue.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| PyPI | langsmith | 0.7.31 | GHSA-rr7j-v2q5-chgv |
| PyPI | langsmith | 0.7.31 | PYSEC-2026-2583 |
| npm | langsmith | 0.5.19 | GHSA-rr7j-v2q5-chgv |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| langchain-ai | langsmith-sdk | < 0.5.19< 0.7.31 |
Weakness: CWE-200, CWE-359, CWE-532 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N