# CVE-2026-41182: LangSmith SDK: Streaming token events bypass output redaction

> The LangSmith SDK fails to redact sensitive data in streaming token events, allowing attackers or unauthorized users to view raw LLM outputs.

- **Severity:** Medium 5.3 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 23 Apr 2026
- **Updated:** 23 Apr 2026
- **Also known as:** ECHO-e53b-c949-a5db, GHSA-rr7j-v2q5-chgv, MINI-29wm-j3h3-g45r, MINI-3xr3-4qc3-f826, MINI-4cgg-hp2p-4q9j, MINI-5g2c-v2pv-g4cp, MINI-67xj-qwgr-j338, MINI-7hq3-5h9w-px76, MINI-84c4-qcwq-6cc7, MINI-956c-78cg-fv42, MINI-f5vh-mc63-cjhg, MINI-qm38-f8pp-rxqv, MINI-xc79-q2jv-5mf7, PYSEC-2026-2583, ROOT-APP-NPM-CVE-2026-41182, ROOT-APP-NPM-GHSA-rr7j-v2q5-chgv, ROOT-APP-PYPI-CVE-2026-41182, ROOT-APP-PYPI-GHSA-rr7j-v2q5-chgv

## What is CVE-2026-41182?

CVE-2026-41182 is a medium-severity vulnerability in langchain-ai langsmith-sdk, published on 23 Apr 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official 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.

Weakness: CWE-532 (Insertion of Sensitive Information into Log File), CWE-359 (Exposure of Private Personal Information to an Unauthorized Actor), CWE-200 (Exposure of Sensitive Information to an Unauthorized Actor)

## Which versions are affected by CVE-2026-41182?

5 open source packages ship an affected version, including langsmith.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `langsmith` | PyPI | All versions | 0.7.31 |
| `langsmith` | PyPI | All versions | 0.7.31 |
| `langsmith` | PyPI | All versions | 0.7.31 |
| `langsmith` | npm | All versions | 0.5.19 |
| `langsmith` | npm | All versions | 0.5.19 |

## How do I fix CVE-2026-41182?

Upgrade langsmith to a fixed version for your release line: 0.7.31 or 0.5.19.

## Is CVE-2026-41182 being exploited?

There is no known exploitation of CVE-2026-41182 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-41182 and fix it if it is affected.

What it is: CVE-2026-41182 is a medium-severity vulnerability in langchain-ai langsmith-sdk, published on 23 Apr 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2026-41182 in the wild and no public exploit code.

Affected packages and fixed versions:
- langsmith (PyPI): affected all versions; fixed in 0.7.31
- langsmith (PyPI): affected all versions; fixed in 0.7.31
- langsmith (PyPI): affected all versions; fixed in 0.7.31
- langsmith (npm): affected all versions; fixed in 0.5.19
- langsmith (npm): affected all versions; fixed in 0.5.19

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-41182/ (Markdown: https://insights.sbomify.com/CVE-2026-41182/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-41182
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-41182
- OSV: https://osv.dev/vulnerability/CVE-2026-41182

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-41182/
Summaries are generated and may contain mistakes; the official description above is the record.
