Security Vulnerability Report
δΈ­ζ–‡
CVE-2026-41182 CVSS 5.3 MEDIUM

CVE-2026-41182

Published: 2026-04-23 02:16:16
Last Modified: 2026-04-29 20:46:34

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.

CVSS Details

CVSS Score
5.3
Severity
MEDIUM
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

Configurations (Affected Products)

No configuration data available.

LangSmith JavaScript SDK < 0.5.19
LangSmith Python SDK < 0.7.31

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
# Proof of Concept for CVE-2026-41182 # Demonstrates sensitive data leakage in streaming events despite redaction config. import os from langsmith import Client # Initialize LangSmith Client (Vulnerable version < 0.7.31) client = Client(api_key=os.getenv("LANGSMITH_API_KEY")) # Sensitive data intended to be hidden sensitive_content = "Secret API Key: 12345-ABCDE" # Configure run with hide_outputs enabled run_params = { "name": "vulnerable_stream_test", "inputs": {"query": "What is the key?"}, "project_name": "poc_test", "hide_outputs": True # Attempt to redact outputs } # Simulate a vulnerable streaming run with client.trace(run_params) as run: # Mock streaming tokens for token in ["Secret", " API", " Key", ":", " 12345-ABCDE"]: # Vulnerability: events bypass redaction logic run.log_event("new_token", token) print("Check LangSmith events. The full key is visible in the 'events' array.")

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-41182", "sourceIdentifier": "[email protected]", "published": "2026-04-23T02:16:16.123", "lastModified": "2026-04-29T20:46:33.890", "vulnStatus": "Deferred", "cveTags": [], "descriptions": [{"lang": "en", "value": "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."}], "metrics": {"cvssMetricV31": [{"source": "[email protected]", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N", "baseScore": 5.3, "baseSeverity": "MEDIUM", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "LOW", "integrityImpact": "NONE", "availabilityImpact": "NONE"}, "exploitabilityScore": 3.9, "impactScore": 1.4}]}, "weaknesses": [{"source": "[email protected]", "type": "Primary", "description": [{"lang": "en", "value": "CWE-200"}, {"lang": "en", "value": "CWE-359"}, {"lang": "en", "value": "CWE-532"}]}], "references": [{"url": "https://github.com/langchain-ai/langsmith-sdk/security/advisories/GHSA-rr7j-v2q5-chgv", "source": "[email protected]"}]}}