Path Traversal in Langchain Core
CVE-2026-34070
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.
Vulnerability class: Path Traversal (Directory Traversal)
Published · last modified .
CVSS v3 metric
CVSS v3 base score 7.5 (High). Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N.
EPSS exploit prediction
EPSS: 0.012 (67.3th percentile), scored .
Low probability of exploitation in the next 30 days, but still tracked. 67th percentile — 67.3% of CVEs in the catalogue have a lower EPSS than this one. How to read EPSS.
EPSS over last 30 days · oldest: 0.014 · newest: 0.012 · change: -0.002
Affected products
- Langchain Core
- Langchain-Ai Langchain — versions < 1.2.22
Weakness classification (CWE)
Public proof-of-concept exploits
References
- github.com/langchain-ai/langchain/security/advisories/GHSA-qh6h-p6c9-ff54 (Exploit, Vendor Advisory)
- github.com/langchain-ai/langchain/commit/27add913474e01e33bededf4096151130ba0d4… (Patch)
- github.com/langchain-ai/langchain/releases/tag/langchain-core==1.2.22 (Release Notes)
- 0b0ca135-0b70-47e7-9f44-1890c2a1c46c
- 0b0ca135-0b70-47e7-9f44-1890c2a1c46c
- 0b0ca135-0b70-47e7-9f44-1890c2a1c46c
- 0b0ca135-0b70-47e7-9f44-1890c2a1c46c
- 0b0ca135-0b70-47e7-9f44-1890c2a1c46c
- 0b0ca135-0b70-47e7-9f44-1890c2a1c46c
Frequently asked questions
- What is CVE-2026-34070?
- CVE-2026-34070 is a high-severity vulnerability in Langchain Core, classified under Path Traversal. CVSS score: 7.5/10. Published 2026-03-31.
- How severe is CVE-2026-34070?
- High severity. CVSS v3 base score is 7.5 out of 10.
- Is CVE-2026-34070 known to be exploited?
- 1 public proof-of-concept repositories are indexed. Not currently listed in the CISA KEV catalog.