LangChain directory traversal vulnerability
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| langchain PyPI |
|
|
| langchain-core PyPI |
|
| Product | Affected | Fixed in |
|---|---|---|
| langchain PyPI |
|
|
| langchain-core PyPI |
|
0.1.300.1.11LangChain 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. (A patch is available as of release 0.1.29 of langchain-core.)
From the CVE record · mitre
LangChain's load_chain call allows directory traversal when an attacker can control the final part of its path parameter. This can bypass the restriction to configurations from the hwchase17/langchain-hub GitHub repository, potentially disclosing an LLM service API key or enabling remote code execution.
Check applications using PyPI langchain versions below 0.0.339 or from 0.1.0 through 0.1.10, or langchain-core versions below 0.1.30 or from 0.1.0 through 0.1.10.