LangChain
LangChain Core has Path Traversal vulnerabilites in legacy `load_prompt` functions
LangChain is a framework for building agents and LLM-powered applications. Prior to version 1.2.22, multiple functions in langchain_core.prompts.loading read files from paths embedded in deserialized config dicts without validating against directory traversal or absolute path injection. When an application passes user-influenced prompt configurations to load_prompt() or load_prompt_from_config(), an attacker can read arbitrary files on the host filesystem, constrained only by file-extension checks (.txt for templates, .json/.yaml for examples). This issue has been patched in version 1.2.22.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- < 1.2.22
Fixed in 1.2.22
Mitigation
Upgrade langchain to 1.2.22 or later.
References
- Vendor advisory github.com/langchain-ai/langchain/security/adv…
- Patch github.com/langchain-ai/langchain/commit/27add…
- Release notes github.com/langchain-ai/langchain/releases/tag…
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.1 informational
Informational 1
| Repository | Created | Stars | Assessment |
|---|---|---|---|
| Rickidevs/CVE-2026-34070 | 26 Mar 2026 −4.5 d | 0 | Informational · write-up |
Only PoCs count toward the first-PoC date and the characteristics below. Do not run PoC code from unknown sources.