SSRF in Langchain
CVE-2024-2057
A vulnerability was found in LangChain langchain_community 0.0.26. It has been classified as critical. Affected is the function load_local in the library libs/community/langchain_community/retrievers/tfidf.py of the component TFIDFRetriever. The manipulation leads to server-side request forgery. It is possible to launch the attack remotely. The exploit has been disclosed to the public and may be used. Upgrading to version 0.0.27 is able to address this issue. It is recommended to upgrade the affected component. The identifier of this vulnerability is VDB-255372.
Vulnerability class: SSRF (Server-Side Request Forgery)
Published · last modified .
CVSS v3 metric
CVSS v3 base score 6.3 (Medium). Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L.
EPSS exploit prediction
EPSS 0.007, 53.0th percentile (scored ); unchanged over 30 days. About EPSS.
Affected products
- Langchain — versions 0.0.26
- Langchain Community — versions 0.0.26
Weakness classification (CWE)
Public exploits and proof-of-concept code
1 public repository with exploit or proof-of-concept code for this CVE:
- dexteon/langchain-tfidf-pickle-rce-cve-2024-2057 (last pushed 2026-11-16): CVE-2024-2057: LangChain TFIDFRetriever pickle deserialization RCE. Lab-only PoC with harmless payload, detection, remediation. Authorized testing only.
Also mentioned in 2 other repositories (bayuncao/bayuncao, fkie-cad/nvd-json-data-feeds). These reference the CVE in a list, notes or a scanner and are not exploit code for it.
References
- VDB-255372 | LangChain langchain_community TFIDFRetriever tfidf.py load_local server-side request forgery (Permissions Required, technical-description, vdb-entry)
- VDB-255372 | CTI Indicators (IOB, IOC, IOA) (signature, Permissions Required, permissions-required)
- github.com/bayuncao/vul-cve-16 (broken-link, Broken Link)
- github.com/bayuncao/vul-cve-16/tree/main/PoC.pkl (exploit, broken-link, Broken Link)
- github.com/langchain-ai/langchain/pull/18695 (issue-tracking, Patch, patch)
This CVE has public exploit evidence. See the latest CVEs with public exploits.