Executive brief
The LangSmith JavaScript/TypeScript SDK, used for interacting with the LangSmith AI development platform, contains a security flaw in its data anonymization component. An attacker who can provide specially crafted data to be processed by the SDK can manipulate the underlying application's memory. This can lead to serious consequences including bypassing security checks, causing the application to crash, or potentially executing unauthorized commands on the server.
Technical details
A prototype pollution vulnerability exists in the LangSmith JS/TS SDK due to an incomplete blacklist in the internally vendored lodash 'baseAssignValue' function. While the function blocks the '__proto__' key, it fails to account for 'constructor.prototype' traversal. An attacker can exploit this via the 'createAnonymizer()' API by providing nested objects with malicious keys; when the SDK attempts to write back anonymized values using 'set()', it traverses the prototype chain to 'Object.prototype'. This affects all objects within the Node.js process and can lead to authentication bypass or Remote Code Execution (RCE) depending on the application environment. The issue is fixed in version 0.5.18.
Affected products
- LangChain langsmith <= 0.5.17
Timeline
- 2026-03-24: disclosed: Initial report submitted
- 2026-04-09: patched: Vendor confirmed and fixed in 0.5.18
- 2026-04-10: advisory: NVD publication date