MediumGHSA-rr7j-v2q5-chgvCVE-2026-41182PYSEC-2026-2583

LangSmith SDK: Streaming token events bypass output redaction

Published 16 Apr 2026 · Updated 10 Sept 2026

Is your project on an affected langsmith?

Private repo? Upload its lockfile instead, or connect GitHub to check every repo.

Look after several JavaScript apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie

Affected packages

Affected
<0.5.19
Fixed in
0.5.19
Update to the fixed version for your release line, for example:npm install langsmith@0.5.19
Affected
<0.7.31
Fixed in
0.7.31
Update to the fixed version for your release line, for example:pip install 'langsmith>=0.7.31'

Details

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.

Is GHSA-rr7j-v2q5-chgv in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected langsmith, and gives you the command that fixes it.

More advisories for langsmith

  • HighCVE-2026-45134LangSmith SDK: Public prompt pull deserializes untrusted manifests without trust boundary warning · 13 May 2026
  • MediumCVE-2026-40190LangSmith Client SDKs has Prototype Pollution in langsmith-sdk via Incomplete `__proto__` Guard in Internal lodash `set()` · 10 Apr 2026
  • MediumCVE-2026-25528LangSmith Client SDK Affected by Server-Side Request Forgery via Tracing Header Injection · 9 Feb 2026
langsmith security overview

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.