CVE-2024-3571
HIGH 8.8CVSS 3.1langchain vulnerable to path traversal
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.
- Published
- 16 Apr 2024
- Last modified
- 7 Jul 2026
- Assigned by
- security@huntr.dev
- NVD status
- Analyzed
- Weakness
- CWE-22
- Also known as
- GHSA-rgp8-pm28-3759PYSEC-2026-1510
- Sources
- NVDJSONOSV GHSA-rgp8-pm28-3759JSONOSV PYSEC-2026-1510JSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | HIGH 8.8 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| NVD | security@huntr.dev (Secondary) | CVSS 3.0 | MEDIUM 6.5 | CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N |
| OSV | GitHub | CVSS 3.0 | MEDIUM 6.5 | CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N |
| OSV | PyPA | CVSS 3.0 | MEDIUM 6.5 | CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | langchain | langchaincpe:2.3:a:langchain:langchain:0.0.351:*:*:*:*:*:*:* |
= 0.0.351 | |
| OSV | PyPI | langchain | < 0.0.353 | 0.0.353 |
References
- https://github.com/langchain-ai/langchain/commit/aad3d8bd47d7f5598156ff2bdcc8f736f24a7412 · Patch, WEB
- https://huntr.com/bounties/2df3acdc-ee4f-4257-bbf8-a7de3870a9d8 · Exploit, Third Party Advisory, WEB
- https://nvd.nist.gov/vuln/detail/CVE-2024-3571 · ADVISORY
- https://github.com/langchain-ai/langchain · PACKAGE
- https://pypi.org/project/langchain · PACKAGE
- https://github.com/advisories/GHSA-rgp8-pm28-3759 · ADVISORY
History
- 25 Nov 2026 20:55 UTC · NVD: first stored (published 16 Apr 2024)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 7 Jul 2026)
- 25 Nov 2026 20:12 UTC · OSV: first stored (published 16 Apr 2024)