CVE-2026-34070
LangChain Core has Path Traversal vulnerabilites in legacy `load_prompt` functions
Also known as GHSA-qh6h-p6c9-ff54, PYSEC-2026-2193
Mitigation
- Upgrade langchain-core to 1.2.22 or later.
Who should check
- Projects that depend on PyPI package langchain-core (< 1.2.22)
- Anyone running langchain-ai langchain < 1.2.22
Vulnerability facts
- Affected
- langchain-core < 1.2.22
- Fixed in
- 1.2.22
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Remote, no login needed
- CVSS
- 7.5 (v3.1, CNA)CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:NOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Network
- Attack complexity: Low
- Privileges required: None
- User interaction: None
- Scope: Unchanged
- Confidentiality impact: High
- Integrity impact: None
- Availability impact: None
- EPSS
- 1.41% chance of exploitation in 30 days (percentile 73, 2026-11-26)
- CWE
- CWE-22
- Modified
Description
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 and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| PyPI langchain-core | < 1.2.22 | 1.2.22 | osv |
| langchain-ai langchain | < 1.2.22 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2026-34070. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2026-34070.md Affected: langchain-core < 1.2.22 Fixed in: 1.2.22 Steps: 1. Search this machine and project for langchain-core (PyPI), langchain-ai langchain: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
- https://github.com/langchain-ai/langchain/security/advisories/GHSA-qh6h-p6c9-ff54
- https://github.com/langchain-ai/langchain/releases/tag/langchain-core==1.2.22
- https://access.redhat.com/errata/RHSA-2026:24766
- https://access.redhat.com/errata/RHSA-2026:59159
- https://access.redhat.com/errata/RHSA-2026:37275
- https://nvd.nist.gov/vuln/detail/CVE-2026-34070
FAQ
Is CVE-2026-34070 being exploited?
There is no confirmed exploitation: CVE-2026-34070 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 1.41% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2026-34070?
High: CVSS 7.5 (v3.1, scored by CNA). Remote, no login needed.
Which versions are affected by CVE-2026-34070?
langchain-core < 1.2.22.
Is there a fix for CVE-2026-34070?
Yes. Fixed in 1.2.22. Upgrade langchain-core to 1.2.22 or later.
How do I check if I'm affected by CVE-2026-34070?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.