LangChainPublished 17 Sept 2024NVD status: Analyzed

CVE-2024-5998

A vulnerability in the FAISS.deserialize_from_bytes function of langchain-ai/langchain allows for pickle deserialization of untrusted data.

ComponentLangChain
Severityhigh (CVSS 7.8)
CVSS vectorCVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Published (NVD)2024-09-17
Last modified2026-06-17
Affected versions
< 0.2.9
from the CVE Program record written by the CNA that assigned the CVE
Fixed in0.2.9
WeaknessCWE-502
CISA KEVnot listed

Versions, checked against NVD

NVD's analysis gives the same ranges as the CVE record written by @huntr_ai, the CNA that assigned the CVE.

NVD 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.

What to do

  • Upgrade LangChain to 0.2.9 or later.
  • Do not expose the component's API or UI to the internet without authentication in front of it.

Sources