# CVE-2024-3571: Path Traversal in langchain-ai/langchain

- Severity: Medium 6.5 (CVSS:3.0, scored by @huntr_ai) `CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.86%, higher than 79% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2024-04-16T00:00:15.193Z
- Modified: 2026-07-07T17:56:42.554Z
- Also known as: GHSA-rgp8-pm28-3759, PYSEC-2026-1510
- Weaknesses: CWE-22
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact partial
- Assigned by: @huntr_ai

## Description

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.

(As written by CVE List.)

## Affected

- langchain-ai langchain-ai/langchain: from unspecified before 0.0.353
- langchain-ai langchain: 0.0.351
- langchain (PyPI): before 0.0.353
- langchain langchain: 0.0.351

## Every score

- @huntr_ai: CVSS:3.0 6.5 Medium `CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N`
- GitHub: CVSS:3.0 6.5 Medium `CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N`
- NVD: CVSS:3.1 8.8 High `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- PyPA Advisory Database: CVSS:3.0 6.5 Medium `CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N`

## References

- <https://huntr.com/bounties/2df3acdc-ee4f-4257-bbf8-a7de3870a9d8> (exploit, third-party-advisory, web)
- <https://github.com/langchain-ai/langchain/commit/aad3d8bd47d7f5598156ff2bdcc8f736f24a7412> (patch, 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)

## Sources

- CVE List: [CVE-2024-3571](https://www.cve.org/CVERecord?id=CVE-2024-3571), CVE Terms of Use, modified 2024-08-01
- GitHub Advisory Database: [GHSA-rgp8-pm28-3759](https://github.com/advisories/GHSA-rgp8-pm28-3759), CC-BY-4.0, modified 2026-07-07
- NVD: [CVE-2024-3571](https://nvd.nist.gov/vuln/detail/CVE-2024-3571), Public domain, modified 2026-06-17
- PyPA Advisory Database: [PYSEC-2026-1510](https://osv.dev/vulnerability/PYSEC-2026-1510), CC-BY-4.0, modified 2026-07-07

---

Page: https://cve.day/CVE-2024-3571 · Whole record: https://cve.day/CVE-2024-3571.json · Rebuilt by cve.day 2026-11-25T22:58:39.241Z
