CVE-2024-3571Langchain
High 8.8
Follow: this CVE · Langchain · Langchain We alert you by email or Slack (account required).
- Priority
- 53
- CVSS 3.1
- 8.8
- EPSS
- 2.5% probability of exploitation in 30 days · percentile 86
- Auth required
- Yes
- Published
- Apr 16, 2024
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-22
- SSVC (CISA)
- Exploitation: proof of concept · Automatable: no · Technical impact: partial
- Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
What happens
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.
What to do
- Apply the vendor's security update for Langchain.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| PyPI | langchain |
< 0.0.353 |
0.0.353 |
pip install "langchain>=0.0.353" |
| PyPI | langchain |
< 0.0.353 |
0.0.353 |
pip install "langchain>=0.0.353" |
Per OSV / GitHub Advisories (GHSA-rgp8-pm28-3759, PYSEC-2026-1510). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| langchain | langchain | 0.0.351 |
Official sources
References
Links published by the sources. Open them with care.
- github.com Patch
- huntr.com Exploit Third Party Advisory