CVE-2026-40190: CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution') in langchain-ai langsmith-sdk
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.
AI Analysis
Technical Summary
The langsmith SDK versions before 0.5.18 contain a prototype pollution vulnerability due to an incomplete patch in the lodash set() utility used internally. Specifically, the baseAssignValue() function only guards against the __proto__ key but does not prevent prototype pollution through constructor.prototype traversal. This allows attackers who can influence keys passed to the createAnonymizer() API to modify Object.prototype, potentially affecting all objects in the Node.js runtime environment. The vulnerability is addressed in langsmith SDK version 0.5.18.
Potential Impact
Successful exploitation allows an attacker to modify Object.prototype in the Node.js process using the vulnerable langsmith SDK, which can lead to unexpected behavior or security issues in applications relying on this SDK. The impact includes potential confidentiality, integrity, and availability losses as indicated by the CVSS vector (C:L/I:L/A:L). No known exploits in the wild have been reported.
Mitigation Recommendations
Upgrade the langsmith SDK to version 0.5.18 or later, where this prototype pollution vulnerability is fixed. Since this is a client SDK and not a cloud service, remediation requires updating the affected software in your environment. Patch status is confirmed by the vendor advisory stating the fix is included in version 0.5.18.
CVE-2026-40190: CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution') in langchain-ai langsmith-sdk
Description
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.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The langsmith SDK versions before 0.5.18 contain a prototype pollution vulnerability due to an incomplete patch in the lodash set() utility used internally. Specifically, the baseAssignValue() function only guards against the __proto__ key but does not prevent prototype pollution through constructor.prototype traversal. This allows attackers who can influence keys passed to the createAnonymizer() API to modify Object.prototype, potentially affecting all objects in the Node.js runtime environment. The vulnerability is addressed in langsmith SDK version 0.5.18.
Potential Impact
Successful exploitation allows an attacker to modify Object.prototype in the Node.js process using the vulnerable langsmith SDK, which can lead to unexpected behavior or security issues in applications relying on this SDK. The impact includes potential confidentiality, integrity, and availability losses as indicated by the CVSS vector (C:L/I:L/A:L). No known exploits in the wild have been reported.
Mitigation Recommendations
Upgrade the langsmith SDK to version 0.5.18 or later, where this prototype pollution vulnerability is fixed. Since this is a client SDK and not a cloud service, remediation requires updating the affected software in your environment. Patch status is confirmed by the vendor advisory stating the fix is included in version 0.5.18.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-04-09T20:59:17.620Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 69d9581c1cc7ad14dae48c85
Added to database: 4/10/2026, 8:05:48 PM
Last enriched: 4/18/2026, 2:34:35 PM
Last updated: 5/25/2026, 6:53:14 AM
Views: 108
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.