LangChain serialization injection vulnerability enables secret extraction
CVE-2025-68665 · GHSA-r399-636x-v7f6 · published 2025-12-23 · updated 2026-02-20
- Severity
- High
- CVSS score
- 8.6
- Chance of exploitation (EPSS)
- 0.79%
- Fixed in
- 1.1.8
- 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). They can also instantiate classes with controlled parameters by injecting constructor structures to instantiate any class within the provided import maps with attacker-controlled parameters, potentially triggering side effects such as network calls or file operations.
Upgrade @langchain/core to 1.1.8 or later, and langchain to 1.2.3 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 | npm | < 0.3.80 | 0.3.80 |
| @langchain/core | npm | >= 1.0.0, < 1.1.8 | 1.1.8 |
| langchain | npm | < 0.3.37 | 0.3.37 |
| langchain | npm | >= 1.0.0, < 1.2.3 | 1.2.3 |
2 registered MCP servers install an affected version today, by the dependency versions a fresh install resolves.
- io.github.Fizzl13/paypal-guard@langchain/core@0.3.6
- io.github.paypal/paypal-mcp-server@langchain/core@0.3.6
- 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
- MediumLangchain Path Traversal vulnerabilitylangchain
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.