LangChain serialization injection vulnerability enables secret extraction in dumps/loads APIs
CVE-2025-68664 · GHSA-c67j-w6g6-q2cm · published 2025-12-23 · updated 2026-10-27
- Severity
- Critical
- CVSS score
- 9.3
- Chance of exploitation (EPSS)
- 42.9%
- Fixed in
- 1.2.5
- Exploitation Public proof of concept
- Automatable Yes
- Technical impact Partial
- CISA SSVC
Attackers who control serialized data can extract environment variable secrets by injecting to load environment variables during deserialization (when secretsfromenv=True, which was the old default). They can also instantiate classes with controlled parameters by injecting constructor structures to instantiate any class within trusted namespaces with attacker-controlled parameters, potentially triggering side effects such as network calls or file operations.
Upgrade langchain-core to 1.2.5 or later. If you start it from an MCP config with npx or uvx, pin that version so an old cached copy is not used.
| Package | Registry | Affected | Fixed in |
|---|---|---|---|
| langchain-core | PyPI | < 0.3.81 | 0.3.81 |
| langchain-core | PyPI | >= 1.0.0, < 1.2.5 | 1.2.5 |
- CriticalLMDeploy has Remote Code Execution by Pickle Deserialization via handle_zmq_recv in lmdeploy/lmdeploy/pytorch/disagg/conn/engine_conn.pylmdeploy
- CriticalLMdeploy has Remote Code Execution by Pickle Deserialization via zmq_rpc.call_and_response() in InterLM/lmdeploylmdeploy
- CriticalSGLang: Unauthenticated RCE via --enable-custom-logit-processorsglang
- CriticalSGLanG: Multimodal scheduler deserializes untrusted pickle data on 0.0.0.0 ROUTER socketsglang
- Criticaln8n: HTTP Request Node Pagination Prototype Pollution to RCEn8n, n8n, n8n
- Criticaln8n Has an XML Node Prototype Pollution Patch Bypassn8n, n8n, n8n
- HighLangChain vulnerable to unsafe deserialization of attacker-controlled objects through overly broad `load()` allowlistslangchain-core, langchain-core
- HighLangChain Core has Path Traversal vulnerabilites in legacy `load_prompt` functionslangchain-core
- HighLangChain Vulnerable to Template Injection via Attribute Access in Prompt Templateslangchain-core, langchain-core
- MediumLangChain has incomplete f-string validation in prompt templateslangchain-core, langchain-core
- Mediumlangchain-core allows unauthorized users to read arbitrary files from the host file systemlangchain-core, langchain-core, langchain-core
- MediumLangChain's XMLOutputParser vulnerable to XML Entity Expansionlangchain-core
The impact, patch and workaround text comes from the advisory, shortened (GitHub Advisory Database, CC BY 4.0). Proof-of-concept and reproduction sections and code are left out; the original advisory has them.