LangSmith SDK: Streaming token events bypass output redaction
Summary
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.
Details
Both JS and Python SDKs are affected. The same pattern exists in both:
- JS SDK:
traceable.ts:997-1003andtraceable.ts:1044-1050 - Python SDK:
run_helpers.py:1924andrun_helpers.py:1996
In 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.
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| npm package | langsmith | < 0.5.19 | 0.5.19 |
| Python (PyPI) | langsmith | < 0.7.31 | 0.7.31 |
References
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N- Weakness (CWE)
CWE-200, CWE-359, CWE-532- Platform
- npm, Python (PyPI)
- Package
langsmith- Disclosed
- 16.04.2026
- Updated
- 11.10.2026 15:17
Sources and licenses
OSV / GitHub Advisory Database - PYSEC-2026-2583 - PyPA Advisory Database; CC BY 4.0
OSV / GitHub Advisory Database - GHSA-rr7j-v2q5-chgv - CC BY 4.0
Vulnerability history: langsmith
All published vulnerabilities of this package (Python (PyPI)), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 4
- First → latest
- 02.2026 06.2026
- Without a fix
- 0
- Exploited in attacks
- 0
Severity breakdown
- High 2
- Medium 2
Disclosures per year
- 2026: 4
-
LangSmith SDK: Streaming token events bypass output redaction this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.