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

Source: https://junglewise.ai/threats/cve-2026-41182-langchain-langsmith-sdk-sensitive-information-leak-in-streaming  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-04-23. Updated: 2026-05-29  
License: CC BY 4.0 with a link back

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](https://junglewise.ai/threats/technologies/langsmith-sdk), [langsmith (npm)](https://junglewise.ai/threats/technologies/langsmith), [langsmith (PyPI)](https://junglewise.ai/threats/technologies/pypi-langsmith). Vendors: [LangChain](https://junglewise.ai/threats/vendors/langchain), [npm](https://junglewise.ai/threats/vendors/npm), [PyPI](https://junglewise.ai/threats/vendors/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

  ```sh
  npm install langsmith@0.5.19
  ```

- langsmith (PyPI): upgrade to 0.7.31 or later

  ```sh
  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

- [https://github.com/langchain-ai/langsmith-sdk/security/advisories/GHSA-rr7j-v2q5-chgv](https://github.com/langchain-ai/langsmith-sdk/security/advisories/GHSA-rr7j-v2q5-chgv)

## Related threats

- [PYSEC-2026-2584 - LangSmith Client SDK Affected by Server-Side Request Forgery via Tracing Header Injection](https://junglewise.ai/threats/cve-2026-25528-langchain-langsmith-sdk-server-side-request-forgery-via-tracing)
- [LangChain LangSmith SDK arbitrary file read in TracingMiddleware](https://junglewise.ai/threats/cve-2026-59152-langchain-langsmith-sdk-arbitrary-file-read-in-tracingmiddleware)
- [LangChain LangSmith SDK untrusted deserialization in prompt pull methods](https://junglewise.ai/threats/cve-2026-45134-langchain-langsmith-sdk-untrusted-deserialization-in-prompt-pull)
- [LangChain LangSmith SDK prototype pollution in createAnonymizer](https://junglewise.ai/threats/cve-2026-40190-langchain-langsmith-sdk-prototype-pollution-in-createanonymizer)
