MediumGHSA-rgp8-pm28-3759CVE-2024-3571PYSEC-2026-1510

langchain vulnerable to path traversal

Published 16 Apr 2024 · Updated 7 Jul 2026

Is your project on an affected langchain?

Private repo? Upload its lockfile instead, or connect GitHub to check every repo.

Look after several Python apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie

Affected package

Affected
<0.0.353
Fixed in
0.0.353
Update to the fixed version for your release line, for example:pip install 'langchain>=0.0.353'

Details

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.

Is GHSA-rgp8-pm28-3759 in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected langchain, and gives you the command that fixes it.

More advisories for langchain

  • MediumCVE-2026-55443LangChain: Path traversal and sandbox escape in LangChain file-search middleware and loaders · 16 Jun 2026
  • HighCVE-2026-45134LangSmith SDK: Public prompt pull deserializes untrusted manifests without trust boundary warning · 13 May 2026
  • LowCVE-2024-8309Langchain SQL Injection vulnerability · 29 Oct 2024
  • LowCVE-2024-5998No summary published · 17 Sept 2024
  • MediumCVE-2024-2965Denial of service in langchain-community · 6 Jun 2024
  • LowCVE-2024-28088LangChain directory traversal vulnerability · 4 Mar 2024
All 23 advisories for langchain

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.