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

Tue, 29 Jul 2025 19:30:00 +0000

Type Values Removed Values Added
First Time appeared Langchain
Langchain langchain
CPEs cpe:2.3:a:langchain:langchain:0.0.351:*:*:*:*:*:*:*
Vendors & Products Langchain
Langchain langchain
Metrics cvssV3_1

{'score': 8.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H'}


cve-icon MITRE

Status: PUBLISHED

Assigner: @huntr_ai

Published: 2024-04-16T00:00:15.193Z

Updated: 2024-08-01T20:12:07.801Z

Reserved: 2024-04-10T09:53:41.729Z

Link: CVE-2024-3571

cve-icon Vulnrichment

Updated: 2024-08-01T20:12:07.801Z

cve-icon NVD

Status : Analyzed

Published: 2024-04-16T00:15:12.203

Modified: 2025-07-29T19:19:25.003

Link: CVE-2024-3571

cve-icon Redhat

No data.