| Component | LangChain |
| Severity | high (CVSS 8.8) |
| CVSS vector | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H |
| Published (NVD) | 2024-04-16 |
| Last modified | 2026-06-17 |
| Affected versions | < 0.0.353 from the GitHub-reviewed advisory GHSA-rgp8-pm28-3759 |
| Fixed in | 0.0.353 |
| Weakness | CWE-22 |
| CISA KEV | not listed |
Versions, checked against NVD
NVD's analysis reads = 0.0.351. The ranges above come from the GitHub-reviewed advisory GHSA-rgp8-pm28-3759. The page and the scanner follow it: no more trusted source, and no two sources together, say otherwise (see the methodology).
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.
What to do
- Upgrade LangChain to
0.0.353or later. - Do not expose the component's API or UI to the internet without authentication in front of it.