CVE-2026-41182
JSON

5.3medium

LangSmith SDK: Streaming token events bypass output redaction

Severity
5.3medium CVSS:3.1 by GitHub_M
Exploit likelihood
0.22% (higher than 13% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-rr7j-v2q5-chgvPYSEC-2026-2583

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

Product or packageVersionsReported by
langchain-ai langsmith-sdk< 0.5.19, < 0.7.31CVE List
langsmith (npm)before 0.5.19GitHub Advisory Database
langsmith (PyPI)before 0.7.31GitHub Advisory Database, PyPA Advisory Database

All scores

GitHub_M5.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
GitHub5.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
PyPA Advisory Database5.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

Classification

CWE-200CWE-359CWE-532

SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.

What each source says

CVE List

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.

GitHub Advisory Database

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.

NVD (es)

Los SDKs de cliente de LangSmith proporcionan SDKs para interactuar con la plataforma LangSmith. Antes de la versión 0.5.19 del SDK de JavaScript y la versión 0.7.31 del SDK de Python, los controles de redacción de salida del SDK de LangSmith (hideOutputs en JS, hide_outputs en Python) no se aplican a los eventos de token de streaming. Cuando una ejecución de LLM produce salida de streaming, cada fragmento se registra como un evento new_token que contiene el valor de token sin procesar. Estos eventos eluden completamente la canalización de redacción - prepareRunCreateOrUpdateInputs (JS) y _hide_run_outputs (Python) solo procesan los campos de entrada y salida en una ejecución, nunca el array de eventos. Como resultado, las aplicaciones que dependen de la redacción de salida para evitar que la salida sensible de LLM se almacene en LangSmith seguirán filtrando el contenido completo de streaming a través de los eventos de ejecución. La versión 0.5.19 del SDK de JavaScript y la versión 0.7.31 del SDK de Python solucionan el problema.

References

Sources

SourceRecordLicence
CVE ListCVE-2026-41182 changed 2026-04-23CVE Terms of Use
GitHub Advisory DatabaseGHSA-rr7j-v2q5-chgv changed 2026-09-10CC-BY-4.0
NVDCVE-2026-41182 changed 2026-10-26Public domain
PyPA Advisory DatabasePYSEC-2026-2583 changed 2026-07-13CC-BY-4.0