{"id":"CVE-2025-68665","published":"2025-12-23T22:56:04Z","modified":"2025-12-24T14:38:40Z","title":"LangChain serialization injection vulnerability enables secret extraction","vendor":"langchain-ai","product":"langchainjs","tier":"tail","description":{"text":"LangChain is a framework for building LLM-powered applications. Prior to @langchain/core versions 0.3.80 and 1.1.8, and prior to langchain versions 0.3.37 and 1.2.3, a serialization injection vulnerability exists in LangChain JS's toJSON() method (and subsequently when string-ifying objects using JSON.stringify(). The method did not escape objects with 'lc' keys when serializing free-form data in kwargs. The 'lc' key is used internally by LangChain to mark serialized objects. When user-controlled data contains this key structure, it is treated as a legitimate LangChain object during deserialization rather than plain user data. This issue has been patched in @langchain/core versions 0.3.80 and 1.1.8, and langchain versions 0.3.37 and 1.2.3","provenance":"source","from":"CVE.org"},"cvss":{"score":8.6,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.0085,"percentile":0.59092,"provenance":"source"},"cwes":[{"id":"CWE-502","name":"Deserialization of Untrusted Data"}],"references":[{"url":"https://github.com/langchain-ai/langchainjs/security/advisories/GHSA-r399-636x-v7f6","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/langchain-ai/langchainjs/commit/e5063f9c6e9989ea067dfdff39262b9e7b6aba62","tags":["x_refsource_MISC"]},{"url":"https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain%2Fcore%401.1.8","tags":["x_refsource_MISC"]},{"url":"https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.2.3","tags":["x_refsource_MISC"]}],"priority":{"score":17.8,"factors":[{"name":"EPSS percentile","points":11.82},{"name":"CVSS severity","points":6.02}]},"vendorSlug":"langchain-ai","affectedVersions":[{"vendor":"langchain-ai","product":"langchainjs","versions":["@langchain/core >= 1.0.0, < 1.1.8","@langchain/core < 0.3.80","langchain >= 1.0.0, < 1.2.3","langchain < 0.3.37"]}],"ssvc":{"exploitation":"poc","automatable":"yes","technicalImpact":"partial","timestamp":"2025-12-24T14:38:36.252592Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"@langchain/core","vulnerableRanges":[">=1.0.0, <1.1.8","<0.3.80"],"patched":["1.1.8","0.3.80"],"from":["GHSA-r399-636x-v7f6"],"provenance":"source"},{"ecosystem":"npm","package":"langchain","vulnerableRanges":[">=1.0.0, <1.2.3","<0.3.37"],"patched":["1.2.3","0.3.37"],"from":["GHSA-r399-636x-v7f6"],"provenance":"source"}],"summary":{"text":"LangChain JS (langchainjs), the LLM application framework, has a serialization injection flaw in its toJSON() method and in JSON.stringify() output, where objects containing the internal 'lc' key are not escaped when free-form user-controlled data is serialized into kwargs. An attacker who can supply such data over the network can have it treated as a legitimate LangChain object during deserialization, which can lead to extraction of secrets, with no authentication or user interaction required and only the default configuration needed.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T20:36:49Z"},"euvd":{"id":"EUVD-2025-204846","exploited":false,"provenance":"source"}}