Free AI Safety Workshop — in collaboration with explainx.aiSave your seat
AgentbeamBeta
AI agent vulnerability · LangChain

CVE-2024-5998: LangChain pickle deserialization of untrusted data

highCVSS 4.0 8.4 · 3.1 5.2GHSA-f2jm-rw3h-6phg

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

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 entries