LangChainGHSA-rgp8-pm28-3759
langchain vulnerable to path traversal
Medium6.5CVE-2024-3571 · Published Apr 16, 2024 · updated Jul 7, 2026
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.
Affected versions
| Package | Affected | Fixed in |
|---|---|---|
| langchain PyPI | < 0.0.353 | 0.0.353 |
Details and references
- CVSS 3.0
- CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
- Severity from
- GitHub (reviewed advisory)
- Weakness
- CWE-22
- Also known as
- CVE-2024-3571, PYSEC-2026-1510
More LangChain advisories
All LangChain| Date | Advisory | Severity | Fixed in |
|---|---|---|---|
| Jun 62024 | Server-Side Request Forgery in langchain-community.retrievers.web_research.WebResearchRetriever | Medium4.8 | 0.2.9 |
| Mar 262024 | LangChain's XMLOutputParser vulnerable to XML Entity Expansion | Medium5.9 | 0.1.35 |
| Mar 42024 | LangChain directory traversal vulnerability | Low | 0.0.339+1 more |
| Mar 12024 | LangChain: server-side request forgery | Critical9.8 | No fix yet |
| Feb 262024 | LangChain Experimental vulnerable to arbitrary code execution | Critical9.8 | 0.0.52 |
| Feb 262024 | langchain Server-Side Request Forgery vulnerability | Low3.7 | 0.1.0 |