{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2025-68665","id":"CVE-2025-68665","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 ","descriptionLong":"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","published":"2025-12-23T22:56:04.837Z","updated":"2026-10-28T02:30:52.765482402Z","reserved":"2025-12-22T23:28:02.917Z","status":"Analyzed","rejected":false,"assigner":"GitHub_M","metric":{"version":"3.1","score":8.6,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N","rating":"high","source":"GitHub_M"},"metrics":[{"version":"3.1","score":8.6,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N","rating":"high","source":"GitHub_M"},{"version":"3.1","score":8.6,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N","rating":"high","source":"github.com"},{"version":"3.1","score":9.1,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","rating":"critical","source":"NVD"},{"version":"3.1","score":8.6,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N","rating":"high","source":"OSV"},{"version":"3.1","score":8.6,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N","rating":"high","source":"GitHub"}],"rating":"high","products":["langchain-ai langchainjs"],"affectedProducts":[{"vendor":"langchain-ai","product":"langchainjs","defaultStatus":null,"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"}],"platforms":[]}],"packages":[{"ecosystem":"npm","name":"@langchain/core","purl":"pkg:npm/%40langchain/core","ranges":[">=1.0.0 <1.1.8","<0.3.80"],"fixed":["1.1.8","0.3.80"],"advisory":"GHSA-r399-636x-v7f6"},{"ecosystem":"npm","name":"langchain","purl":"pkg:npm/langchain","ranges":[">=1.0.0 <1.2.3","<0.3.37"],"fixed":["1.2.3","0.3.37"],"advisory":"GHSA-r399-636x-v7f6"}],"cwes":["CWE-502"],"aliases":["GHSA-r399-636x-v7f6"],"references":[{"url":"https://github.com/langchain-ai/langchainjs/security/advisories/GHSA-r399-636x-v7f6","tags":["x_refsource_CONFIRM","exploit","Vendor Advisory","advisory","web"]},{"url":"https://github.com/langchain-ai/langchainjs/commit/e5063f9c6e9989ea067dfdff39262b9e7b6aba62","tags":["x_refsource_MISC","Patch","fix","web"]},{"url":"https://github.com/langchain-ai/langchainjs/releases/tag/%40langchain%2Fcore%401.1.8","tags":["x_refsource_MISC","Release Notes","web"]},{"url":"https://github.com/langchain-ai/langchainjs/releases/tag/langchain%401.2.3","tags":["x_refsource_MISC","Release Notes","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/68xxx/CVE-2025-68665.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-68665","tags":["advisory"]},{"url":"https://github.com/langchain-ai/langchainjs","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":true,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"poc","automatable":"yes","technicalImpact":"partial"},"epss":0.00793,"epssPercentile":0.57141,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2025-68665","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-68665","ok":true,"note":"Analyzed"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2025-68665","ok":true,"note":"2 packages"},{"name":"GitHub Advisory","url":"https://github.com/advisories/GHSA-r399-636x-v7f6","ok":true,"note":"GHSA-r399-636x-v7f6"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2025-68665","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}