CVE-2024-3571: langchain-ai/langchain - Path Traversal
- Cve: CVE-2024-3571
- Name: langchain-ai/langchain - Path Traversal
- 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.
- Impact: Attackers can access or modify arbitrary files on the filesystem, potentially leading to information disclosure or remote code execution.
- Remediation: Implement proper input sanitization and restrict file paths to designated directories; update to the latest version with security patches.
- Vulnerability type: path_traversal
- Vulnerability impact: file_system_read, file_system_write
- Requirement type: none
- Labels source: projectdiscovery
- Severity: high
- Cvss score: 8.8
- Cvss vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Epss score: 0.01856
- Epss percentile: 0.79735
- Assignee: [email protected]
- Published at: 2024-04-16T00:15:12Z
- Age in days: 952
- Modified at: 2026-06-17T07:44:32Z
- Patch available: yes
- Public exploits total: 1
- References total: 2
- Products total: 1
- Oss: yes
- Projects total: 1
- Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2024-3571
- Nvd status: analyzed
- Checked, none or zero: known exploited entries, nuclei templates, public exploits capped, rejected by nvd
- Not known: requirements, hackerone
Cwe
| Id | Name |
|---|---|
| CWE-22 | Improper Limitation of a Pathname to a Restricted Directory |
Public exploits
| Url | Source | Added date |
|---|---|---|
| https://huntr.com/bounties/2df3acdc-ee4f-4257-bbf8-a7de3870a9d8 | nvd | 2024-04-16 |
References
| Url | Source | Tags |
|---|---|---|
| https://github.com/langchain-ai/langchain/commit/aad3d8bd47d7f5598156ff2bdcc8f736f24a7412 | nvd | Patch |
| https://huntr.com/bounties/2df3acdc-ee4f-4257-bbf8-a7de3870a9d8 | nvd | Exploit, Third Party Advisory |
Products
| Product | Affected | Platform bound | Sources | Url |
|---|---|---|---|---|
| langchain:langchain | = 0.0.351 | no | nvd | /v1/products/langchain/langchain |
Projects
| Repository | Link kinds | Indexed | Url |
|---|---|---|---|
| langchain-ai/langchain | commit, fix, package | yes | /v1/repositories/langchain-ai/langchain |
Index
- Repositories: 551
- Repositories high signal: 262
- Packages: 1
Exploitation
- Public exploit: yes
- Public exploit count: 1
- Public exploit first date: 2024-04-16
- Remote: yes
- Authentication required: yes
- Checked, none or zero: known exploited, known exploited by, exploitation seen, initial access
- Not known: known exploited since, vulncheck known exploited since, nuclei template, initial access since, hackerone reports, exposed hosts