CVE-2024-5998: LangChain pickle deserialization of untrusted data
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.
Published Sep 17, 2024 · Updated Jul 30, 2025
Affected packages
langchain-community
- Ecosystem
- PyPI
- Affected
- < 0.2.4
- Fixed in
- 0.2.4
- Check
pip show langchain-community
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
A vulnerability in the FAISS.deserialize_from_bytes 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.
Credited to BarrensZeppelin.
References
- https://nvd.nist.gov/vuln/detail/CVE-2024-5998
- https://huntr.com/bounties/fa3a2753-57c3-4e08-a176-d7a3ffda28fe
- https://github.com/langchain-ai/langchain/commit/77209f315efd13442ec51c67719ba37dfaa44511
- https://github.com/langchain-ai/langchain/commit/604dfe2d99246b0c09f047c604f0c63eafba31e7
- https://github.com/advisories/GHSA-f2jm-rw3h-6phg
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More LangChain vulnerabilities
All LangChain entriesCVE-2026-55443
LangChain: Path traversal and sandbox escape in LangChain file-search middleware and loaders
medium5.1Jun 16, 2026CVE-2026-45134
LangSmith SDK: Public prompt pull deserializes untrusted manifests without trust boundary warning
high7.1May 13, 2026CVE-2026-44843
LangChain vulnerable to unsafe deserialization of attacker-controlled objects through overly broad `load()` allowlists
high8.2May 8, 2026CVE-2026-40087
LangChain has incomplete f-string validation in prompt templates
medium5.3Apr 8, 2026CVE-2026-34070
LangChain Core has Path Traversal vulnerabilites in legacy `load_prompt` functions
high7.5Mar 27, 2026CVE-2026-27795
LangChain Community: redirect chaining can lead to SSRF bypass via RecursiveUrlLoader
medium4.1Feb 25, 2026
