{"id":"CVE-2025-68664","published":"2025-12-23T22:47:44Z","modified":"2025-12-24T14:40:58Z","title":"LangChain serialization injection vulnerability enables secret extraction in dumps/loads APIs","vendor":"langchain-ai","product":"langchain","tier":"tail","description":{"text":"LangChain is a framework for building agents and LLM-powered applications. Prior to versions 0.3.81 and 1.2.5, a serialization injection vulnerability exists in LangChain's dumps() and dumpd() functions. The functions do not escape dictionaries with 'lc' keys when serializing free-form dictionaries. 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 versions 0.3.81 and 1.2.5.","provenance":"source","from":"CVE.org"},"cvss":{"score":9.3,"severity":"CRITICAL","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:L/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.4293,"percentile":0.98749,"provenance":"source"},"cwes":[{"id":"CWE-502","name":"Deserialization of Untrusted Data"}],"references":[{"url":"https://github.com/langchain-ai/langchain/security/advisories/GHSA-c67j-w6g6-q2cm","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/langchain-ai/langchain/pull/34455","tags":["x_refsource_MISC"]},{"url":"https://github.com/langchain-ai/langchain/pull/34458","tags":["x_refsource_MISC"]},{"url":"https://github.com/langchain-ai/langchain/commit/5ec0fa69de31bbe3d76e4cf9cd65a6accb8466c8","tags":["x_refsource_MISC"]},{"url":"https://github.com/langchain-ai/langchain/commit/d9ec4c5cc78960abd37da79b0250f5642e6f0ce6","tags":["x_refsource_MISC"]},{"url":"https://github.com/langchain-ai/langchain/releases/tag/langchain-core%3D%3D0.3.81","tags":["x_refsource_MISC"]},{"url":"https://github.com/langchain-ai/langchain/releases/tag/langchain-core%3D%3D1.2.5","tags":["x_refsource_MISC"]}],"priority":{"score":31.3,"factors":[{"name":"EPSS percentile","points":19.75},{"name":"Public exploit code","points":5.0},{"name":"CVSS severity","points":6.51}]},"exploitSources":{"exploitdb":{"count":1,"earliest":"2026-04-29"},"pocGithub":{"count":3,"skipped":1,"earliest":"2025-12-27","earliestUrl":"https://github.com/Ak-cybe/CVE-2025-68664-LangGrinch-PoC","repos":[{"name":"Ak-cybe/CVE-2025-68664-LangGrinch-PoC","url":"https://github.com/Ak-cybe/CVE-2025-68664-LangGrinch-PoC","stars":3,"created":"2025-12-27"},{"name":"Johnnyzhou666/langgrinch-cve-2025-68664-analysis","url":"https://github.com/Johnnyzhou666/langgrinch-cve-2025-68664-analysis","stars":0,"created":"2026-05-10"},{"name":"t-sorger/cve-2025-68664-langgrinch","url":"https://github.com/t-sorger/cve-2025-68664-langgrinch","stars":0,"created":"2026-09-06"}]},"first":{"date":"2025-12-27","source":"PoC-in-GitHub","url":"https://github.com/Ak-cybe/CVE-2025-68664-LangGrinch-PoC"},"provenance":"source"},"vendorSlug":"langchain-ai","affectedVersions":[{"vendor":"langchain-ai","product":"langchain","versions":[">= 1.0.0, < 1.2.5","< 0.3.81"]}],"ssvc":{"exploitation":"poc","automatable":"yes","technicalImpact":"partial","timestamp":"2025-12-24T14:40:55.506059Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"langchain-core","vulnerableRanges":[">=1.0.0, <1.2.5","<0.3.81"],"patched":["1.2.5","0.3.81"],"from":["GHSA-c67j-w6g6-q2cm","PYSEC-2026-373"],"provenance":"source"}],"summary":{"text":"The LangChain framework (langchain-ai/langchain) has a serialization injection flaw in its dumps() and dumpd() functions, which fail to escape dictionaries containing the reserved 'lc' key used internally to mark serialized objects. An attacker who can supply user-controlled data containing that key structure can have it treated as a legitimate LangChain object when deserialized, and this is reachable over the network with no privileges or user interaction required, though the attacker must be able to supply the data that gets serialized and later loaded.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T06:27:13Z"},"euvd":{"id":"EUVD-2025-204849","exploited":false,"provenance":"source"},"exploits":[{"id":52514,"url":"https://www.exploit-db.com/exploits/52514","title":"LangChain Core 1.2.4 - SSTI/RCE","date":"2026-04-29","verified":false,"provenance":"source"}],"lineage":{"packageHistory":[{"cve":"CVE-2024-1455","published":"2024-03-26","fixed":"0.1.35","kev":false},{"cve":"CVE-2024-10940","published":"2025-03-20","fixed":"0.3.15","kev":false},{"cve":"CVE-2025-65106","published":"2025-11-21","fixed":"1.0.7","kev":false,"link":{"from":"CVE-2025-65106","to":"CVE-2025-68664","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:langchain-core","fromFixed":"1.0.7","toFixed":"1.2.5","daysApart":32},{"kind":"version-step","provenance":"source","package":"PyPI:langchain-core","fromFixed":"0.3.80","toFixed":"0.3.81","daysApart":32}]}},{"cve":"CVE-2025-68664","published":"2025-12-23","fixed":"1.2.5","kev":false},{"cve":"CVE-2026-26013","published":"2026-02-10","fixed":"1.2.11","kev":false,"link":{"from":"CVE-2025-68664","to":"CVE-2026-26013","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:langchain-core","fromFixed":"1.2.5","toFixed":"1.2.11","daysApart":49}]}},{"cve":"CVE-2026-34070","published":"2026-03-31","fixed":"1.2.22","kev":false},{"cve":"CVE-2026-40087","published":"2026-04-09","fixed":"1.2.28","kev":false,"link":{"from":"CVE-2025-68664","to":"CVE-2026-40087","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:langchain-core","fromFixed":"0.3.81","toFixed":"0.3.84","daysApart":107}]}}],"package":"PyPI:langchain-core"}}