Skip to main content

LangSmith SDK EUVDEUVD-2026-21594

| CVE-2026-40190 CRITICAL
Improperly Controlled Modification of Object Prototype Attributes (Prototype Pollution) (CWE-1321)
2026-04-10 GitHub_M GHSA-fw9q-39r9-c252
Critical
Disputed · 9.8 NVD
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Identify app using langsmith createAnonymizer
  2. Delivery
    Submit JSON with key 'constructor.prototype.x'
  3. Exploit
    Anonymizer walks keys into vendored set()
  4. Execution
    constructor.prototype traversal bypasses __proto__ guard
  5. Persist
    Object.prototype polluted process-wide
  6. Impact
    Auth bypass or denial of service

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V3 - Web Frontend Security Prototype pollution prevention
MITRE ATT&CK

2 techniques across 2 tactics: Execution, Initial Access

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires the host Node.js application to use the langsmith createAnonymizer() API (langsmith/anonymizer) AND to pass it data whose object keys are attacker-controlled; the attacker supplies a key such as 'constructor.prototype.<prop>'. Limiting factors: this is not exploitable against a default or idle install - the anonymizer feature must be in use on an untrusted input path, the version must be <= 0.5.17, and the runtime must be Node.js (the flaw pollutes Object.prototype). Real-world impact beyond process-wide pollution further depends on the presence of an exploitable prototype-pollution gadget in the application or its dependencies, which is why SSVC rates technical impact only 'partial'. The NVD PR:N/AC:L rating understates that the anonymizer-with-untrusted-keys precondition is required.

Impact

The signals conflict and should not be taken at face value. NVD publishes CVSS 9.8 (AV:N/AC:L/PR:N/UI:N, full C/I/A High), but the vendor's own GHSA advisory rates it Medium (~5.6) and the SSVC decision records Technical Impact as only 'partial' with Automatable 'no'. EPSS is very low at 0.04% (12th percentile), it is not in CISA KEV, and there is no evidence of exploitation in the wild. The realistic impact of prototype pollution here is not guaranteed remote code execution - it is process-wide object corruption whose consequence (DoS, logic bypass, or RCE) depends on the presence of a suitable gadget chain in the host application, which the SDK cannot guarantee. Crucially, the 9.8 assumes a direct network/no-privilege path, yet exploitation actually requires the consuming application to (a) use the createAnonymizer() feature and (b) feed it data whose object keys the attacker controls - a meaningful precondition the raw CVSS omits. Treat this as a Medium-priority library-hygiene fix for applications that anonymize untrusted input, not a drop-everything internet-facing RCE. The 9.8 appears inflated versus the vendor and SSVC assessment - verify against the GHSA before prioritizing.

Exploit ScenarioDerived

An application uses langsmith's createAnonymizer() to redact secrets from user-supplied JSON before logging to LangSmith. An attacker submits a payload whose object key is 'constructor.prototype.isAdmin' (as demonstrated in the fix's regression test); when the anonymizer processes it, Object.prototype.isAdmin is set for every object in the Node.js process, enabling authorization-logic bypass or denial of service. Proof-of-concept input exists in the patch test suite, and the attack is network-reachable but requires the app to actually anonymize attacker-controlled data.

Act Now Prioritize within 24-48h. Why: CRITICAL severity.
Patch available 0.0% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv3 – Jul 07, 2026

Prototype pollution in the LangSmith JavaScript/TypeScript SDK (npm 'langsmith', versions <= 0.5.17) lets an attacker who controls object keys passed to the createAnonymizer() API pollute Object.prototype for the entire Node.js process. The internally vendored lodash set() utility guards only the __proto__ key and misses the constructor.prototype traversal path, so a crafted key like 'constructor.prototype.polluted' bypasses the fix. Publicly available exploit code exists (SSVC 'poc' plus regression tests in the fix PR), but EPSS is only 0.04% with no evidence of active exploitation; notably the vendor GHSA rates this Medium (~CVSS 5.6), conflicting sharply with the NVD 9.8.

Earlier versions of this analysis (2)
v2 Jul 07, 2026 - 18:45 cvss changed CVSS 9.8

Prototype pollution in the LangSmith JavaScript/TypeScript SDK (langsmith npm package, versions <= 0.5.17) lets an attacker who controls object keys in data passed to the createAnonymizer() API poison Object.prototype across the entire Node.js process. The SDK's internally vendored lodash set() utility guards only against the __proto__ key and misses the constructor.prototype traversal path, so a crafted key such as 'constructor.prototype.polluted' bypasses the fix. Publicly available exploit code exists (the fix commit ships proof-of-concept tests), but there is no public exploit weaponization and EPSS is very low at 0.04%; it is fixed in 0.5.18.

v1 Apr 10, 2026 - 20:15 CVSS 5.6

Prototype pollution in LangSmith JavaScript/TypeScript SDK (langsmith) versions prior to 0.5.18 allows remote attackers to pollute Object.prototype via the createAnonymizer() API by supplying malicious constructor.prototype keys, bypassing an incomplete __proto__ filter. The vulnerability affects all objects in the Node.js process and can lead to information disclosure and integrity violations. No public exploit code or active exploitation has been confirmed at time of analysis.

RemediationAI

Vendor-released patch: upgrade the npm 'langsmith' package to 0.5.18 or later, which rewrites the anonymizer to write values back through direct parent-object/key references and eliminates the path-parsing set() call entirely, removing the pollution sink. The fix is in PR https://github.com/langchain-ai/langsmith-sdk/pull/2690 and commit 31d3c3aec02892f4312baae112f817d6b2f0ebe3; see advisory https://github.com/langchain-ai/langsmith-sdk/security/advisories/GHSA-fw9q-39r9-c252. If you cannot upgrade immediately, the concrete compensating control is to avoid passing untrusted or attacker-influenced data to createAnonymizer()/langsmith/anonymizer, or to sanitize/reject input object keys matching 'constructor', 'prototype', or '__proto__' before anonymization - the trade-off is that legitimate data containing those literal key names will be dropped or rejected. Freezing Object.prototype (Object.freeze) process-wide can also blunt pollution but risks breaking libraries that legitimately write to prototypes and is not a substitute for the patch.

Affected VersionsENISA

langsmith-sdk < 0.5.18

Affected Packages

npm langsmith fix: 0.5.18
euvd langsmith_sdk fix: 0.5.18

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in npm, euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

The flaw is CWE-1321 (Improperly Controlled Modification of Object Prototype Attributes) in Node.js. The SDK ships its own copy of lodash's set() at js/src/utils/lodash/. Its baseAssignValue() function special-cases only the literal key '__proto__' (via Object.defineProperty) and otherwise does a raw object[key] = value assignment. Because castPath() splits a dotted path such as 'constructor.prototype.polluted' into ['constructor','prototype','polluted'] and baseSet() walks that chain, execution reaches Object.prototype and assigns the terminal key there - the guard never triggers because that final key is not '__proto__'. The reachable sink is createAnonymizer() (importable as langsmith/anonymizer): extractStringNodes() recursively walks input objects building dotted paths from their keys, and the masking step later feeds those attacker-influenced paths back into the vulnerable set(). The affected package per CPE is cpe:2.3:a:langchain-ai:langsmith-sdk. The Python SDK on PyPI does not use lodash and is not affected.

Know when Prototype Pollution gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Sources disagree (Medium–Critical)
NVD PRIMARY 9.8 CRITICAL
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
vuln.today AI 5.6 MEDIUM

AV:N since data can arrive remotely and PR:N as no auth is inherent, but AC:H because the app must use createAnonymizer on attacker-keyed input and real impact needs a gadget; C/I/A:L reflect the partial technical impact.

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L
4.0 AV:N/AC:H/AT:N/PR:N/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N
SUSE 5.6 MEDIUM
AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L

vuln.today treats the vendor’s rating as authoritative. A higher third-party CVSS (e.g. CISA-ADP) is shown for transparency but does not drive the headline severity.

CVSS VectorNVD

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

6
Analysis Updated
Jul 07, 2026 - 18:45 vuln.today
v3 - CVSS changed
Analysis Updated
Jul 07, 2026 - 18:45 vuln.today
v2 - CVSS changed
Severity Changed
Jul 07, 2026 - 18:37 NVD
MEDIUM CRITICAL
CVSS changed
Jul 07, 2026 - 18:37 NVD
5.6 (MEDIUM) 9.8 (CRITICAL)
Patch released
Apr 11, 2026 - 02:30 nvd
Patch available
CVE Published
Apr 10, 2026 - 19:47 nvd
MEDIUM 5.6

DescriptionNVD

LangSmith Client SDKs provide SDK's for interacting with the LangSmith platform. Prior to 0.5.18, the LangSmith JavaScript/TypeScript SDK (langsmith) contains an incomplete prototype pollution fix in its internally vendored lodash set() utility. The baseAssignValue() function only guards against the __proto__ key, but fails to prevent traversal via constructor.prototype. This allows an attacker who controls keys in data processed by the createAnonymizer() API to pollute Object.prototype, affecting all objects in the Node.js process. This vulnerability is fixed in 0.5.18.

Executive ViewAI

Why It Matters

The LangSmith JavaScript SDK (npm 'langsmith', versions ≤0.5.17) contains a critical prototype pollution flaw affecting any Node.js application using this popular AI library. Exploitation could allow an attacker to corrupt the entire application runtime through object key injection in the createAnonymizer() API, with no authentication required. Real-world risk remains minimal given zero observed exploitation activity (EPSS 0.0%) and immediate patch availability, enabling straightforward remediation.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.0%
Top 88% exploitable
Prevalence
Medium
widely used LangChain/LLM observability SDK, but anonymizer feature is niche
Threat Intel
1
1 source
Social Media
1
Sightings
Data Quality
8 sources
Confidence: High
EUVD NVD CVE.org EPSS Vulnrichment GHSA Vendor CIRCL GitHub VulDB

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC No
EPSS 0.0%
Patch available Yes
Active threat No
Deciding rule
CRITICAL severity
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Scheduled
Exploitation
Poc
System Exposure· derived
Open
Automatable
No
Human Impact
High
Technical Impact
Partial

Priority Score

49
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +49
PoC: 0
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.

CVE-2026-34621 HIGH POC
8.6 Apr 11

Prototype pollution in Adobe Acrobat Reader versions 24.001.30356, 26.001.21367 and earlier enables arbitrary code execu

CVE-2021-23450 CRITICAL POC
9.8 Dec 17

All versions of package dojo are vulnerable to Prototype Pollution via the setObject function. Rated critical severity (

CVE-2024-56059 CRITICAL
9.8 Dec 18

Prototype pollution in the farinspace Partners WordPress plugin (versions up to and including 0.2.0) enables remote unau

CVE-2021-23383 CRITICAL POC
9.8 May 04

The package handlebars before 4.7.7 are vulnerable to Prototype Pollution when selecting certain compiling options to co

CVE-2020-7788 CRITICAL POC
9.8 Dec 11

This affects the package ini before 1.3.6. Rated critical severity (CVSS 9.8), this vulnerability is remotely exploitabl

CVE-2020-28271 CRITICAL POC
9.8 Nov 12

Prototype pollution vulnerability in 'deephas' versions 1.0.0 through 1.0.5 allows attacker to cause a denial of service

CVE-2023-38894 CRITICAL POC
9.8 Aug 16

A Prototype Pollution issue in Cronvel Tree-kit v.0.7.4 and before allows a remote attacker to execute arbitrary code vi

CVE-2024-24292 CRITICAL POC
9.8 Mar 28

A Prototype Pollution issue in Aliconnect /sdk v.0.0.6 allows an attacker to execute arbitrary code via the aim function

CVE-2023-26121 CRITICAL POC
10.0 Apr 11

All versions of the package safe-eval are vulnerable to Prototype Pollution via the safeEval function, due to improper s

CVE-2021-23449 CRITICAL POC
10.0 Oct 18

This affects the package vm2 before 3.9.4 via a Prototype Pollution attack vector, which can lead to execution of arbitr

CVE-2024-39011 CRITICAL POC
9.8 Jul 30

Prototype Pollution in chargeover redoc v2.0.9-rc.69 allows attackers to execute arbitrary code or cause a Denial of Ser

CVE-2024-38988 CRITICAL POC
9.8 Mar 28

alizeait unflatto <= 1.0.2 was discovered to contain a prototype pollution via the method exports.unflatto at /dist/inde

Vendor StatusVendor

SUSE

Severity: Medium

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy