LangChain pickle deserialization of untrusted data
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.
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| Python (PyPI) | langchain | < 0.2.9 | 0.2.9 |
| Python (PyPI) | langchain-community | < 0.2.4 | 0.2.4 |
References
- https://nvd.nist.gov/vuln/detail/CVE-2024-5998
- https://github.com/langchain-ai/langchain/commit/604dfe2d99246b0c09f047c604f0c63eafba31e7
- https://github.com/langchain-ai/langchain/commit/77209f315efd13442ec51c67719ba37dfaa44511
- https://github.com/langchain-ai/langchain
- https://huntr.com/bounties/fa3a2753-57c3-4e08-a176-d7a3ffda28fe
- https://pypi.org/project/langchain-community
- https://github.com/advisories/GHSA-f2jm-rw3h-6phg
- CVSS vector
CVSS:3.1/AV:P/AC:L/PR:L/UI:R/S:U/C:H/I:L/A:L- Weakness (CWE)
CWE-502- Platform
- Python (PyPI)
- Package
langchain, langchain-community- Disclosed
- 17.09.2024
- Updated
- 11.10.2026 13:19
Sources and licenses
OSV / GitHub Advisory Database - PYSEC-2024-323 - PyPA Advisory Database; CC BY 4.0
OSV / GitHub Advisory Database - GHSA-f2jm-rw3h-6phg - CC BY 4.0
OSV / GitHub Advisory Database - PYSEC-2026-1514 - PyPA Advisory Database; CC BY 4.0
Vulnerability history: langchain-community
All published vulnerabilities of this package (Python (PyPI)), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 6
- First → latest
- 03.2024 09.2025
- Without a fix
- 1
- Exploited in attacks
- 0
Severity breakdown
- Critical 2
- High 1
- Medium 3
Disclosures per year
- 2024: 4
- 2025: 2
- 2026: 0
-
LangChain pickle deserialization of untrusted data this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.