CVE-2026-40190 LangSmith Client SDKs has Prototype Pollution in langsmith-sdk via Incomplete `__proto__` Guard in Internal lodash `set()`
Prototype pollution in LangSmith SDK allows attackers to modify Object.prototype via crafted keys, potentially leading to code execution or privilege escalation.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2026-40190?
CVE-2026-40190 is a medium-severity vulnerability in langchain-ai langsmith-sdk, published on 10 Apr 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official 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.
Weakness: CWE-1321
Which versions are affected by CVE-2026-40190?
2 open source packages ship an affected version, including langsmith. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
langsmith npm | All versions | 0.5.18 |
langsmith npm | All versions | 0.5.18 |
Products include Langchain Langsmith.
How do I fix CVE-2026-40190?
Upgrade langsmith to 0.5.18 or later.
Is CVE-2026-40190 being exploited?
It is not confirmed as exploited in the wild, but public exploit code for CVE-2026-40190 exists.
Other vulnerabilities in langchain-ai langsmith-sdk
Sources
Also known as ECHO-4586-52d3-1687, GHSA-fw9q-39r9-c252, MINI-2r39-prj9-w236, MINI-2rgp-5c7v-fjpq, MINI-4fqr-xrww-2298, MINI-97h9-5638-wwrf and 8 more.