PT-2026-59238 · Pypi · Langsmith
Published
2026-07-13
·
Updated
2026-07-13
CVSS v3.1
5.3
Medium
| Vector | AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N |
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.Fix
Found an issue in the description? Have something to add? Feel free to write us 👾
Related Identifiers
Affected Products
Langsmith