LangChain Core has Path Traversal vulnerabilites in legacy `load_prompt` functions
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Information disclosure
- Confidentiality · integrity · availability
- High · None · None
- Fix status
- Partial Red Hat: 2 fixed, 2 without a fix
Attack profile from CVSS 3.1 · CNA. Fix status from CNA, GitHub and Red Hat. Impact type from CWE-22 and the CVSS impact.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- Yes
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| langchain-ai | langchain | before 1.2.22 | 1.2.22 | Patch available | CNA |
| — | langchain-core (PyPI) | before 1.2.22 | 1.2.22 | Patch available | GHSA-qh6h-p6c9-ff54 |
- langchain Vendorlangchain-ai Affected before 1.2.22 Fixed in 1.2.22 Patch available CNA
- langchain-core (PyPI) Vendor— Affected before 1.2.22 Fixed in 1.2.22 Patch available GHSA-qh6h-p6c9-ff54
CPE configurations NVD · 1
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:langchain:langchain_core:*:*:*:*:*:python:*:* | before 1.2.22 | Vulnerable | langchain-ai |
- cpe:2.3:a:langchain:langchain_core:*:*:*:*:*:python:*:* Versions before 1.2.22 Vulnerable ·langchain-ai
Remediation
- Fix · CNA langchain (langchain-ai) Fixed in 1.2.22
- Fix · GHSA-qh6h-p6c9-ff54 langchain-core (PyPI) Fixed in 1.2.22 Advisory →
Red Hat 3 advisories
- RHSA-2026:59159 Released 2026-08-24 · Red Hat rating ImportantRed Hat Ansible Automation Platform 2.5 Container Release Update
- Red Hat Ansible Automation Platform 2.5 registry.redhat.io/ansible-automation-platform-25/controller-rhel8, registry.redhat.io/ansible-automation-platform-25/hub-rhel8, registry.redhat.io/ansible-automation-platform-25/lightspeed-rhel8
- RHSA-2026:37275 Released 2026-07-09 · Red Hat rating CriticalRHOAI 3.3.5 - Red Hat OpenShift AI
- Red Hat OpenShift AI 3.3 registry.redhat.io/rhoai/odh-dashboard-rhel9, registry.redhat.io/rhoai/odh-data-science-pipelines-operator-controller-rhel9, registry.redhat.io/rhoai/odh-feast-operator-rhel9 +45
- RHSA-2026:24766 Released 2026-06-09 · Red Hat rating ImportantRed Hat Ansible Automation Platform 2.5 Container Release Update
- Red Hat Ansible Automation Platform 2.5 registry.redhat.io/ansible-automation-platform-25/lightspeed-rhel8
Vendor assessments
Red Hat
Red Hat rating: Important. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| OpenShift Lightspeed | Affected | No fix yet |
| Red Hat Ansible Automation Platform 2 | Affected | No fix planned: Will not fix |
| Red Hat Ansible Automation Platform 2.5 | Fixed | RHSA-2026:24766, RHSA-2026:59159 |
| Red Hat OpenShift AI 3.3 | Fixed | RHSA-2026:37275 |
Not affected: 3 products
- Red Hat Ansible Automation Platform 2.5
- Red Hat OpenShift AI (RHOAI)
- Red Hat OpenShift AI 3.3
Timeline
- 2026-10-02 Threatist record created from CVE-2026-34070
- 2026-10-03 Alias added: GHSA-qh6h-p6c9-ff54
References
More langchain-ai Langchain Core vulnerabilities
- TI-2025-42157 LangChain serialization injection vulnerability enables secret extraction in dumps/loads APIs CVSS 3.1CRITICAL 9.3
- TI-2026-28915 LangChain has incomplete f-string validation in prompt templates CVSS 3.1MEDIUM 5.3
- TI-2026-21027 LangChain affected by SSRF via image_url token counting in ChatOpenAI.get_num_tokens_from_messages CVSS 3.1LOW 3.7
Sources
- CVE-2026-34070 · CVE Program
- CVE-2026-34070 · NVD
- FIRST EPSS
- GHSA-qh6h-p6c9-ff54 · GitHub Advisory Database · CC BY 4.0
- CVE-2026-34070 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences