{"id":"CVE-2025-68665","state":"PUBLISHED","title":"LangChain serialization injection vulnerability enables secret extraction","description":"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","publishedAt":"2025-12-23T22:56:04.837Z","updatedAt":"2025-12-24T14:38:40.268Z","severity":{"score":8.6,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N","source":"GitHub_M"},"assigner":"GitHub_M","products":["langchain-ai langchainjs"],"affected":[{"vendor":"langchain-ai","product":"langchainjs","versions":[{"version":"@langchain/core >= 1.0.0, < 1.1.8","status":"affected"},{"version":"@langchain/core < 0.3.80","status":"affected"},{"version":"langchain >= 1.0.0, < 1.2.3","status":"affected"},{"version":"langchain < 0.3.37","status":"affected"}]}],"references":["https://github.com/langchain-ai/langchainjs/security/advisories/GHSA-r399-636x-v7f6","https://github.com/langchain-ai/langchainjs/commit/e5063f9c6e9989ea067dfdff39262b9e7b6aba62","https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain%2Fcore%401.1.8","https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.2.3"],"weaknesses":["CWE-502"],"ingestedAt":"2026-10-29T20:09:56.034Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2025/68xxx/CVE-2025-68665.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2025-68665","state":"PUBLISHED","datePublished":"2025-12-23T22:56:04.837Z","dateUpdated":"2025-12-24T14:38:40.268Z","assignerShortName":"GitHub_M","assignerOrgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateReserved":"2025-12-22T23:28:02.917Z"},"containers":{"cna":{"title":"LangChain serialization injection vulnerability enables secret extraction","descriptions":[{"lang":"en","value":"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"}],"affected":[{"vendor":"langchain-ai","product":"langchainjs","versions":[{"version":"@langchain/core >= 1.0.0, < 1.1.8","status":"affected"},{"version":"@langchain/core < 0.3.80","status":"affected"},{"version":"langchain >= 1.0.0, < 1.2.3","status":"affected"},{"version":"langchain < 0.3.37","status":"affected"}]}],"references":[{"url":"https://github.com/langchain-ai/langchainjs/security/advisories/GHSA-r399-636x-v7f6","name":"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","name":"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","name":"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","name":"https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.2.3","tags":["x_refsource_MISC"]}],"metrics":[{"cvssV3_1":{"attackComplexity":"LOW","attackVector":"NETWORK","availabilityImpact":"NONE","baseScore":8.6,"baseSeverity":"HIGH","confidentialityImpact":"HIGH","integrityImpact":"NONE","privilegesRequired":"NONE","scope":"CHANGED","userInteraction":"NONE","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N","version":"3.1"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-502","lang":"en","description":"CWE-502: Deserialization of Untrusted Data","type":"CWE"}]}],"providerMetadata":{"shortName":"GitHub_M","orgId":"a0819718-46f1-4df5-94e2-005712e83aaa","dateUpdated":"2025-12-23T22:56:04.837Z"},"source":{"advisory":"GHSA-r399-636x-v7f6","discovery":"UNKNOWN"}},"adp":[{"title":"CISA ADP Vulnrichment","references":[{"url":"https://github.com/langchain-ai/langchainjs/security/advisories/GHSA-r399-636x-v7f6","tags":["exploit"]}],"metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2025-12-24T14:38:36.252592Z","id":"CVE-2025-68665","options":[{"Exploitation":"poc"},{"Automatable":"yes"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2025-12-24T14:38:40.268Z"}}]}}}