Path Traversal in langchain-ai/langchain
Key facts
- Attack vector
- Network
- Privileges required
- Low
- User interaction
- None
- Attack complexity
- Low
- Impact type
- —
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · NVD. Fix status from CNA and GitHub.
Summary
langchain-ai/langchain is vulnerable to path traversal due to improper limitation of a pathname to a restricted directory ('Path Traversal') in its LocalFileStore functionality. An attacker can leverage this vulnerability to read or write files anywhere on the filesystem, potentially leading to information disclosure or remote code execution. The issue lies in the handling of file paths in the mset and mget methods, where user-supplied input is not adequately sanitized, allowing directory traversal sequences to reach unintended directories.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| langchain-ai | langchain-ai/langchain | before 0.0.353 | 0.0.353 | Patch available | CNA |
| — | langchain (PyPI) | before 0.0.353 | 0.0.353 | Patch available | GHSA-rgp8-pm28-3759 |
- langchain-ai/langchain Vendorlangchain-ai Affected before 0.0.353 Fixed in 0.0.353 Patch available CNA
- langchain (PyPI) Vendor— Affected before 0.0.353 Fixed in 0.0.353 Patch available GHSA-rgp8-pm28-3759
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:langchain:langchain:0.0.351:*:*:*:*:*:*:* | 0.0.351 | Vulnerable | langchain-ai |
- cpe:2.3:a:langchain:langchain:0.0.351:*:*:*:*:*:*:* Versions 0.0.351 Vulnerable ·langchain-ai
Remediation
- Fix · CNA langchain-ai/langchain (langchain-ai) Fixed in 0.0.353
- Fix · GHSA-rgp8-pm28-3759 langchain (PyPI) Fixed in 0.0.353 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2024-3571
- 2026-10-03 Alias added: GHSA-rgp8-pm28-3759
References
More langchain-ai Langchain vulnerabilities
- TI-2023-20724 An issue in langchain langchain-ai v.0.0.232 and before allows a remote attacker to… CVSS 3.1CRITICAL 9.8
- TI-2023-20706 An issue in LanChain-ai Langchain v.0.0.245 allows a remote attacker to execute arbitrary… CVSS 3.1CRITICAL 9.8
- TI-2023-20166 An issue in Harrison Chase langchain v.0.0.194 and before allows a remote attacker to… CVSS 3.1CRITICAL 9.8
- TI-2023-20136 An issue in LangChain v.0.0.231 allows a remote attacker to execute arbitrary code via the prompt parameter. CVSS 3.1CRITICAL 9.8
- TI-2023-18185 An issue in langchain v.0.0.171 allows a remote attacker to execute arbitrary code via a… CVSS 3.1CRITICAL 9.8
- TI-2023-18176 An issue in LangChain before 0.0.236 allows an attacker to execute arbitrary code because… CVSS 3.1CRITICAL 9.8
Sources
- CVE-2024-3571 · CVE Program
- CVE-2024-3571 · NVD
- FIRST EPSS
- GHSA-rgp8-pm28-3759 · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences