CVE-2026-40190: CWE-1321: Improperly Controlled Modification of Object Prototype Attributes ('Prototype Pollution') in langchain-ai langsmith-sdk
A prototype pollution vulnerability exists in langchain-ai's langsmith-sdk versions prior to 0. 5. 18. The issue arises from an incomplete fix in the lodash set() utility used internally, where traversal via constructor. prototype is not prevented. This allows attackers controlling keys in data processed by the createAnonymizer() API to modify Object. prototype, potentially impacting all objects in the Node. js process. The vulnerability is fixed in version 0. 5.
AI Analysis
Technical Summary
The langsmith JavaScript/TypeScript SDK prior to version 0.5.18 contains a prototype pollution vulnerability due to an incomplete fix in its internally vendored lodash set() utility. Specifically, the baseAssignValue() function only blocks the __proto__ key but fails to prevent prototype pollution via constructor.prototype traversal. This flaw enables an attacker who can control keys in data passed to the createAnonymizer() API to modify Object.prototype, 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 data integrity issues and potentially affect the behavior of all objects in the process. The CVSS score of 5.6 (medium severity) reflects limited attack complexity but potential impact on confidentiality, integrity, and availability.
Mitigation Recommendations
Upgrade langsmith-sdk to version 0.5.18 or later, where this prototype pollution vulnerability is fixed. No other official remediation or temporary fixes are documented. Patch status is not explicitly stated in the vendor advisory, but the description confirms 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
A prototype pollution vulnerability exists in langchain-ai's langsmith-sdk versions prior to 0. 5. 18. The issue arises from an incomplete fix in the lodash set() utility used internally, where traversal via constructor. prototype is not prevented. This allows attackers controlling keys in data processed by the createAnonymizer() API to modify Object. prototype, potentially impacting all objects in the Node. js process. The vulnerability is fixed in version 0. 5.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The langsmith JavaScript/TypeScript SDK prior to version 0.5.18 contains a prototype pollution vulnerability due to an incomplete fix in its internally vendored lodash set() utility. Specifically, the baseAssignValue() function only blocks the __proto__ key but fails to prevent prototype pollution via constructor.prototype traversal. This flaw enables an attacker who can control keys in data passed to the createAnonymizer() API to modify Object.prototype, 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 data integrity issues and potentially affect the behavior of all objects in the process. The CVSS score of 5.6 (medium severity) reflects limited attack complexity but potential impact on confidentiality, integrity, and availability.
Mitigation Recommendations
Upgrade langsmith-sdk to version 0.5.18 or later, where this prototype pollution vulnerability is fixed. No other official remediation or temporary fixes are documented. Patch status is not explicitly stated in the vendor advisory, but the description confirms 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/10/2026, 8:21:14 PM
Last updated: 4/10/2026, 11:05:46 PM
Views: 7
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.