AI and data stack advisories

Severe, 6 weeks1498Projects326

1498 severe, 6 weeks · 326 projects

LangChainGHSA-rgp8-pm28-3759

langchain vulnerable to path traversal

LangChain

CVE-2024-3571 · Published Apr 16, 2024 · updated Jul 7, 2026

Medium6.5
Fix: upgrade to 0.0.353 or later
GitHub advisory

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

PackageAffectedFixed in
langchain
PyPI
< 0.0.3530.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