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

- Severity: Medium 5.2 (CVSS:3.0, scored by @huntr_ai) `CVSS:3.0/AV:P/AC:L/PR:L/UI:R/S:U/C:H/I:L/A:L`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.36%, higher than 31% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2024-09-17T11:50:13.813Z
- Modified: 2026-07-13T07:26:23.643Z
- Also known as: GHSA-f2jm-rw3h-6phg, PYSEC-2024-323, PYSEC-2026-1514
- Weaknesses: CWE-502
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: @huntr_ai

## Description

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.

(As written by CVE List.)

## Affected

- langchain-ai langchain-ai/langchain: from unspecified before 0.2.9
- langchain langchain: before 0.2.9
- langchain-community (PyPI): before 0.2.4
- langchain (PyPI): before 0.2.9

## Every score

- @huntr_ai: CVSS:3.0 5.2 Medium `CVSS:3.0/AV:P/AC:L/PR:L/UI:R/S:U/C:H/I:L/A:L`
- GitHub: CVSS:3.1 5.2 High `CVSS:3.1/AV:P/AC:L/PR:L/UI:R/S:U/C:H/I:L/A:L`
- GitHub: CVSS:4.0 High `CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:A/VC:H/VI:H/VA:L/SC:N/SI:N/SA:N`
- NVD: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- PyPA Advisory Database: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H`
- PyPA Advisory Database: CVSS:3.1 5.2 Medium `CVSS:3.1/AV:P/AC:L/PR:L/UI:R/S:U/C:H/I:L/A:L`
- PyPA Advisory Database: CVSS:4.0 `CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:A/VC:H/VI:H/VA:L/SC:N/SI:N/SA:N`

## References

- <https://huntr.com/bounties/fa3a2753-57c3-4e08-a176-d7a3ffda28fe> (exploit, evidence, third-party-advisory, web)
- <https://github.com/langchain-ai/langchain/commit/604dfe2d99246b0c09f047c604f0c63eafba31e7> (fix, patch, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2024-5998> (advisory)
- <https://github.com/langchain-ai/langchain/commit/77209f315efd13442ec51c67719ba37dfaa44511> (web)
- <https://github.com/langchain-ai/langchain> (package)
- <https://pypi.org/project/langchain-community> (package)
- <https://github.com/advisories/GHSA-f2jm-rw3h-6phg> (advisory)

## Sources

- CVE List: [CVE-2024-5998](https://www.cve.org/CVERecord?id=CVE-2024-5998), CVE Terms of Use, modified 2024-09-17
- GitHub Advisory Database: [GHSA-f2jm-rw3h-6phg](https://github.com/advisories/GHSA-f2jm-rw3h-6phg), CC-BY-4.0, modified 2026-07-13
- NVD: [CVE-2024-5998](https://nvd.nist.gov/vuln/detail/CVE-2024-5998), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2024-323](https://osv.dev/vulnerability/PYSEC-2024-323), CC-BY-4.0, modified 2026-07-13
- PyPA Advisory Database: [PYSEC-2026-1514](https://osv.dev/vulnerability/PYSEC-2026-1514), CC-BY-4.0, modified 2026-07-13

---

Page: https://cve.day/CVE-2024-5998 · Whole record: https://cve.day/CVE-2024-5998.json · Rebuilt by cve.day 2026-11-25T22:58:45.500Z
