LangChain directory traversal vulnerability
Published 4 Mar 2024 · Updated 3 Dec 2024
Is your project on an affected langchain?
Look after several Python apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie
Affected packages
- Affected
- <0.0.339
- Fixed in
- 0.0.339
pip install 'langchain>=0.0.339'- Affected
- <0.1.30
- Fixed in
- 0.1.30
pip install 'langchain-core>=0.1.30'Details
LangChain through 0.1.10 allows ../ directory traversal by an actor who is able to control the final part of the path parameter in a load_chain call. This bypasses the intended behavior of loading configurations only from the hwchase17/langchain-hub GitHub repository. The outcome can be disclosure of an API key for a large language model online service, or remote code execution.
Is GHSA-h59x-p739-982c 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
- MediumCVE-2024-3571langchain vulnerable to path traversal · 16 Apr 2024
References
- Advisorynvd.nist.gov/vuln/detail/CVE-2024-28088
- Linkgithub.com/langchain-ai/langchain/pull/18600
- Linkgithub.com/langchain-ai/langchain/commit/e1924b3e93d513ca950c72f8e80e1c133749fba5
- Linkgithub.com/PinkDraconian/PoC-Langchain-RCE/blob/main/README.md
- Packagegithub.com/langchain-ai/langchain
- Linkgithub.com/langchain-ai/langchain/blob/f96dd57501131840b713ed7c2e86cbf1ddc2761f/libs/core/langchain_core/utils/loading.py
- Linkgithub.com/pypa/advisory-database/tree/main/vulns/langchain-core/PYSEC-2024-45.yaml
- Linkgithub.com/pypa/advisory-database/tree/main/vulns/langchain/PYSEC-2024-43.yaml
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.