# CVE-2024-5998: Deserialization of Untrusted Data in langchain-ai/langchain

- Priority: **Routine**
- Reason: Not severe (CVSS 5.2, physical access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2024-09-17 · Modified: 2024-09-17
- Aliases: GHSA-f2jm-rw3h-6phg, PYSEC-2024-323, PYSEC-2026-1514
- Record: https://cvemate.com/vulnerability/CVE-2024-5998 · JSON: https://cvemate.com/vulnerability/CVE-2024-5998/json

## Description

```text
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 the latest version of the product.
```

## Signals

- CVSS: 7.8 high (v3.1, NVD) CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
- EPSS: 0.361%, percentile 31.853%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 1 (reference)

## Affected

- langchain-ai langchain-ai/langchain: ≥ unspecified, \< 0.2.9
- langchain langchain: \< 0.2.9
- PyPI langchain (PyPI): \< 0.2.9
- PyPI langchain-community (PyPI): \< 0.2.4

## References

- <https://huntr.com/bounties/fa3a2753-57c3-4e08-a176-d7a3ffda28fe>
- <https://github.com/langchain-ai/langchain/commit/604dfe2d99246b0c09f047c604f0c63eafba31e7>
- <https://nvd.nist.gov/vuln/detail/CVE-2024-5998>
- <https://github.com/langchain-ai/langchain/commit/77209f315efd13442ec51c67719ba37dfaa44511>
- <https://github.com/langchain-ai/langchain>
- <https://pypi.org/project/langchain-community>
- <https://github.com/advisories/GHSA-f2jm-rw3h-6phg>

---

Data as of 2026-12-05T12:51:55.217Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
