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

Published Apr 16, 2024
·
Updated

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

2 affected componentsFixes available
pip/langchain<0.0.353
0.0.353
Langchain Langchain=0.0.351

Event History

Apr 16, 2024
CVE Published
via MITRE·12:00 AM
Data Sourced
via MITRE·12:00 AM
DescriptionSeverityWeakness
Data Sourced
via NVD·12:15 AM
DescriptionSeverityWeakness
Data Sourced
via NVD·12:15 AM
RemedyAffected Software
Advisory Published
via GitHub·12:30 AM

Frequently Asked Questions

1

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.

2

How do I fix CVE-2024-3571?

To fix CVE-2024-3571, you should upgrade to langchain version 0.0.353 or later.

3

What type of vulnerability is CVE-2024-3571?

CVE-2024-3571 is a path traversal vulnerability affecting the LocalFileStore functionality in langchain.

4

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.

5

Which software versions are affected by CVE-2024-3571?

CVE-2024-3571 affects langchain versions prior to 0.0.353.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203