LangChain pickle deserialization of untrusted data
CVE-2024-5998 · GHSA-f2jm-rw3h-6phg · published 2024-09-17 · updated 2025-07-30
- Severity
- High
- CVSS score
- 5.2
- Chance of exploitation (EPSS)
- 0.36%
- Fixed in
- 0.2.4
- Exploitation Public proof of concept
- Automatable No
- Technical impact Partial
- CISA SSVC
A vulnerability in the FAISS.deserializefrombytes function of langchain-ai/langchain allows for pickle deserialization of untrusted data. This can lead to the execution of arbitrary commands via the os.system function. The issue affects versions prior to 0.2.4.
Upgrade langchain-community to 0.2.4 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-community | PyPI | < 0.2.4 | 0.2.4 |
- 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 Community Vulnerable to XML External Entity (XXE) Attackslangchain-community
- HighLangChain Community SSRF vulnerability exists in RequestsToolkit componentlangchain-community
- MediumDenial of service in langchain-communitylangchain, langchain-community
- MediumServer-Side Request Forgery in langchain-community.retrievers.web_research.WebResearchRetrieverlangchain-community
- LowLangchain SQL Injection vulnerabilitylangchain, langchain-community
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.