CVE-2026-40190: LangSmith Client SDKs has Prototype Pollution in langsmith-sdk via Incomplete `__proto__` Guard in Internal lodash `set()`
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.
References
- github.com/advisories/GHSA-fw9q-39r9-c252
- github.com/langchain-ai/langsmith-sdk
- github.com/langchain-ai/langsmith-sdk/commit/31d3c3aec02892f4312baae112f817d6b2f0ebe3
- github.com/langchain-ai/langsmith-sdk/pull/2690
- github.com/langchain-ai/langsmith-sdk/security/advisories/GHSA-fw9q-39r9-c252
- nvd.nist.gov/vuln/detail/CVE-2026-40190
Code Behaviors & Features
Detect and mitigate CVE-2026-40190 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →