CVE-2024-5998
Deserialization of Untrusted Data in langchain-ai/langchain
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.
Attack profile
How easy it is to exploit
- Attack vector
- Physical
- Complexity
- Low
- Privileges needed
- Low
- User interaction
- Required
What an attacker can affect
- Confidentiality
- High
- Integrity
- Low
- Availability
- Low
Exploit likelihood
What each source reports
CVE List Score used
5.2
Deserialization of Untrusted Data in langchain-ai/langchain
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.
- Record
CVE-2024-5998- 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 - Weakness
- CWE-502
- Updated
- 2026-11-02
EUVDEUVD-2024-2778
5.2
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.
- Record
EUVD-2024-2778- 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 - Updated
- 2026-11-03
GitHub AdvisoriesGHSA-f2jm-rw3h-6phg
8.4
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.
- Record
GHSA-f2jm-rw3h-6phg- CVSS 4.0
- 8.4 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 - 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 - Weakness
- CWE-502
- Updated
- 2026-11-02
NVD
7.8
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.
- Record
CVE-2024-5998- 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 - 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 - Weakness
- CWE-502
- Updated
- 2026-11-02
OSV
5.2
Deserialization of Untrusted Data in langchain-ai/langchain
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.
- Record
CVE-2024-5998- 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 - Weakness
- CWE-502
- Updated
- 2026-11-02
OSVGHSA-f2jm-rw3h-6phg
8.4
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.
- Record
GHSA-f2jm-rw3h-6phg- CVSS 4.0
- 8.4 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 - 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 - Weakness
- CWE-502
- Updated
- 2026-11-02
OSVPYSEC-2024-323
7.8
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.
- Record
PYSEC-2024-323- 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 - Updated
- 2026-11-02
OSVPYSEC-2026-1514
8.4
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.
- Record
PYSEC-2026-1514- CVSS 4.0
- 8.4 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 - 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 - Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
langchain-communityPyPI |
before 0.2.4 | 0.2.4 |
langchain-communityPyPI |
before 0.2.4, plus listed versions 0.0.10.0.100.0.110.0.120.0.13 Show 40 moreShow less0.0.140.0.150.0.160.0.170.0.180.0.190.0.1rc10.0.1rc20.0.20.0.200.0.210.0.220.0.230.0.240.0.250.0.260.0.270.0.280.0.290.0.30.0.300.0.310.0.320.0.330.0.340.0.350.0.360.0.370.0.380.0.40.0.50.0.60.0.70.0.80.0.90.2.00.2.0rc10.2.10.2.20.2.3 |
0.2.4 |
langchainPyPI |
before 0.2.9, plus listed versions 0.0.10.0.100.0.1000.0.1010.0.101rc0 Show 45 moreShow less0.0.1020.0.102rc00.0.1030.0.1040.0.1050.0.1060.0.1070.0.1080.0.1090.0.110.0.1100.0.1110.0.1120.0.1130.0.1140.0.1150.0.1160.0.1170.0.1180.0.1190.0.120.0.1200.0.1210.0.1220.0.1230.0.1240.0.1250.0.1260.0.1270.0.1280.0.1290.0.130.0.1300.0.1310.0.1320.0.1330.0.1340.0.1350.0.1360.0.1370.0.1380.0.1390.0.140.0.1400.0.141 |
0.2.9 |
History
| Recorded | Changed | Sources |
|---|---|---|
| aliases, published | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2024-5998 is a medium vulnerability (CVSS 5.2) in Langchain, published September 17, 2024. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.36%, the 29th percentile. Fixed in langchain-community 0.2.4.
References
huntr.com/bounties/fa3a2753-57c3-4e08-a176-d7a3ffda28fe
github.com/langchain-ai/langchain/commit/604dfe2d99246b0c09f047c604f0c63eafba31e7
nvd.nist.gov/vuln/detail/CVE-2024-5998
github.com/langchain-ai/langchain/commit/77209f315efd13442ec51c67719ba37dfaa44511
github.com/advisories/GHSA-f2jm-rw3h-6phg
github.com/CVEProject/cvelistV5/tree/main/cves/2024/5xxx/CVE-2024-5998.json
github.com/langchain-ai/langchain
pypi.org/project/langchain-community
Left out here: 347 versions. The JSON record has them.