Monitor vulnerabilities like this one.
Sign up free to get alerted when software you use is affected.
5.3
LangSmith SDK: Sensitive data leaked in streaming token events
GHSA-rr7j-v2q5-chgv
Summary
LangSmith SDK's output redaction controls don't apply to streaming token events, which can leak sensitive data. This affects both JavaScript and Python SDKs. To protect sensitive data, review your usage of LangSmith SDK and ensure you're not storing streamed content.
What to do
- Update GitHub Actions langsmith to version 0.5.19.
- Update langsmith to version 0.7.31.
Affected software
| Ecosystem | Vendor | Product | Affected versions |
|---|---|---|---|
| npm | GitHub Actions | langsmith |
< 0.5.19 Fix: upgrade to 0.5.19
|
| PyPI | – | langsmith |
< 0.7.31 Fix: upgrade to 0.7.31
|
Original title
LangSmith SDK: Streaming token events bypass output redaction
Original description
## 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-1003` and `traceable.ts:1044-1050`
- **Python SDK**: `run_helpers.py:1924` and `run_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`.
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-1003` and `traceable.ts:1044-1050`
- **Python SDK**: `run_helpers.py:1924` and `run_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`.
osv CVSS3.1
5.3
Vulnerability type
CWE-200
Information Exposure
CWE-359
CWE-532
Insertion of Sensitive Information into Log File
Published: 16 Apr 2026 · Updated: 16 Apr 2026 · First seen: 16 Apr 2026