GHSA-qh6h-p6c9-ff54: LangChain Core has Path Traversal vulnerabilites in legacy `load_prompt` functions
- Identifiers
- CVE-2026-34070GHSA-qh6h-p6c9-ff54
- Published
- Record updated
- Affected
- langchain-core < 1.2.22
- Fixed in
- 1.2.22
- released March 24, 2026, 3 days before disclosure
- Known exploitation
- Not listed in the CISA Known Exploited Vulnerabilities catalog at the last check.
- EPSS
- 1.4%
Summary
Multiple functions in `langchain_core.prompts.loading` read files from paths in deserialized config dicts without checking for absolute paths or `..` traversal. When an application passes user-influenced prompt configurations to `load_prompt()` or `load_prompt_from_config()`, an attacker can read arbitrary host files, limited only by `.txt`, `.json`, `.yaml` and `.yml` extension checks.
Mitigation
Update `langchain-core` to >= 1.2.22. The fix rejects absolute paths and `..` sequences by default, with an `allow_dangerous_paths=True` argument for trusted inputs. The legacy APIs are deprecated and will be removed in 2.0.0; migrate to `dumpd`/`dumps`/`load`/`loads` from `langchain_core.load`.
Affected packages in the Exposure Registry
Matched by package name and ecosystem. Each entry shows whether the package delegates to a language model and how many tracked packages depend on it.
- langchain-corePyPILLM dependency since 2023-11-20 · 60 tracked dependents
Related items
- MediumGHSA-8prr-f582-jqq3: LangGraph CLI prints the registry push token in `langgraph deploy --verbose` outputSame vendor · GitHub Advisory Database
- HighGHSA-4hm6-w6qq-w73v: LangGraph JavaScript custom authentication may permit cross-user Store accessSame vendor · GitHub Advisory Database
- MediumGHSA-3fx2-cqw9-xr3c: LangGraph: Unencoded identifiers in LangGraph SDK v3 streaming can redirect authenticated GET requestsSame vendor · GitHub Advisory Database
- MediumGHSA-6hmw-9432-67qq: LangGraph: Namespace labels containing `.` reach other namespaces in Postgres and SQLite storesSame vendor · GitHub Advisory Database
- MediumCVE-2026-108575: BerriAI LiteLLM improper authorization in secret resolution via api_keySame vendor · NVD/CVE Database