highCVSS 8.8NVD status: Analyzed

CVE-2024-3571

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.

ComponentLangChain
Severityhigh (CVSS 8.8)
CVSS vectorCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Published (NVD)2024-04-16
Last modified2026-06-17
Affected versions
langchain = 0.0.351
Fixed insee the vendor advisory
WeaknessCWE-22
CISA KEVnot listed

NVD 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.

Does CVE-2024-3571 hit the version you run?Paste your docker-compose.yml, requirements.txt or package.json. The scanner checks your pinned versions against this CVE and every other one we track for LangChain.
Check my stack

What to do

  • NVD lists no fixed version yet: follow the vendor advisory below and keep LangChain off the public internet until a fix ships.
  • Do not expose the component's API or UI to the internet without authentication in front of it.

Sources

Other LangChain CVEs

All LangChain CVEs