CVE-2024-3571: Path Traversal in langchain-ai/langchain
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 Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2024-3571?
CVE-2024-3571 is classified as a high severity vulnerability due to its potential to allow unauthorized file access on the filesystem.
How do I fix CVE-2024-3571?
To fix CVE-2024-3571, you should upgrade to langchain version 0.0.353 or later.
What type of vulnerability is CVE-2024-3571?
CVE-2024-3571 is a path traversal vulnerability affecting the LocalFileStore functionality in langchain.
What can an attacker do with CVE-2024-3571?
An attacker can exploit CVE-2024-3571 to read or write files anywhere on the filesystem.
Which software versions are affected by CVE-2024-3571?
CVE-2024-3571 affects langchain versions prior to 0.0.353.