CVE-2026-41182: LangChain LangSmith SDK sensitive information leak in streaming events

CVE-2026-41182 · Severity: medium · CVSS 5.3 · Published 2026-04-23

LangSmith SDKs are used to monitor and debug Large Language Model (LLM) applications. A flaw in the SDKs' redaction feature allows sensitive information to be leaked to the LangSmith platform even when users have explicitly enabled privacy controls to hide outputs. This occurs because the redaction logic fails to filter data during real-time streaming, potentially exposing private customer data or proprietary information in logs.

Technologies: LangChain LangSmith SDK, langsmith (npm), langsmith (PyPI). Vendors: LangChain, npm, PyPI.

Quick answers

Is CVE-2026-41182 exploited in the wild?
No. Junglewise Threat Intelligence has no report of CVE-2026-41182 being exploited in the wild.
How severe is CVE-2026-41182?
Medium severity, with a CVSS score of 5.3, published 23 April 2026.
Which products and versions are affected?
LangChain LangSmith SDK <=0.7.30; langsmith (npm) <= 0.5.18, SEMVER:introduced=0,fixed=0.5.19; langsmith (PyPI) ECOSYSTEM:introduced=0,fixed=0.7.31.
Is there a fix for CVE-2026-41182?
Yes. langsmith (npm): upgrade to 0.5.19 or later; langsmith (PyPI): upgrade to 0.7.31 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
How is CVE-2026-41182 attacked?
It is attacked over the network, in a software library.
Am I affected by CVE-2026-41182?
Check whether you run LangChain LangSmith SDK, langsmith (npm) or langsmith (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

How to fix

  • langsmith (npm): upgrade to 0.5.19 or later
    npm install langsmith@0.5.19
  • langsmith (PyPI): upgrade to 0.7.31 or later
    pip install "langsmith>=0.7.31"

Technical details

A vulnerability exists in the LangSmith JavaScript and Python SDKs where output redaction controls (hideOutputs/hide_outputs) are bypassed during LLM streaming. While the SDKs correctly redact the final 'inputs' and 'outputs' fields of a run, they fail to process the 'events' array. During streaming, each chunk is recorded as a 'new_token' event containing the raw token value. Because the redaction pipeline (specifically prepareRunCreateOrUpdateInputs in JS and _hide_run_outputs in Python) does not inspect these events, sensitive data is transmitted to and stored on the LangSmith platform in its raw form. This issue is resolved in JavaScript SDK version 0.5.19 and Python SDK version 0.7.31.

Affected products

  • LangChain langsmith-sdk (Python) <=0.7.30
  • LangChain langsmith (JavaScript/NPM) <=0.5.18

Identifiers

  • CVE-2026-41182
  • GHSA-rr7j-v2q5-chgv
  • PYSEC-2026-2583

Timeline

  • 2026-04-14: advisory: GitHub Security Advisory published
  • 2026-04-23: disclosed: CVE published to NVD

References

This page as Markdown. Free to reuse under CC BY 4.0 with a link back.