CVE-2026-34070
published high CVSS 3.1 · 7.5LangChain Core has Path Traversal vulnerabilites in legacy `load_prompt` functions
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| langchain-ai | — | langchain< 1.2.22 | Affected | Not stated | GitHub_M |
| Red Hat | — | ansible-automation-platform-25/lightspeed-rhel8Red Hat Ansible Automation Platform 2.5 · 1780082949 and later · 1787229385 and later · Other versions: affected | Unaffected | Not stated | redhat-SADP |
| Red Hat | — | rhoai/odh-llama-stack-core-rhel9Red Hat OpenShift AI 3.3 · 1782471587 and later · Other versions: affected | Unaffected | Not stated | redhat-SADP |
| Red Hat | — | rhoai/odh-trustyai-nemo-guardrails-server-rhel9Red Hat OpenShift AI 3.3 · 1782471606 and later · Other versions: affected | Unaffected | Not stated | redhat-SADP |
| Red Hat | — | openshift-lightspeed/lightspeed-service-api-rhel9OpenShift Lightspeed | Affected | Not stated | redhat-SADP |
| Red Hat | — | ansible-automation-platform-25/lightspeed-chatbot-rhel8Red Hat Ansible Automation Platform 2 | Affected | Not stated | redhat-SADP |
| Red Hat | — | ansible-automation-platform-26/lightspeed-rhel9Red Hat Ansible Automation Platform 2 | Affected | Not stated | redhat-SADP |
| Red Hat | — | rhoai/odh-mlflow-rhel9Red Hat OpenShift AI (RHOAI) | Unaffected | Not required | redhat-SADP |
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.
A flaw was found in LangChain. Multiple functions in `langchain_core.prompts.loading` read files from paths embedded in deserialized configuration dictionaries without validation for 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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 3.1
- Base score
- 7.5 / 10
- Severity
- high
- Provider
- GitHub_M · cna
- Vector string
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Additional Assessments
| Version | Score | Severity | Provider | Vector | Scenarios |
|---|---|---|---|---|---|
| 3.1 | 7.5 | high | redhat-SADP · adp | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N | — |
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| langchain-ai | langchain | < 1.2.22 (affected) | GitHub_M · cna |
| Red Hat | Red Hat Ansible Automation Platform 2.5 | 1780082949 and later (unaffected · rpm)1787229385 and later (unaffected · rpm)Default: affected | redhat-SADP · adp |
| Red Hat | Red Hat OpenShift AI 3.3 | 1782471587 and later (unaffected · rpm)Default: affected | redhat-SADP · adp |
| Red Hat | Red Hat OpenShift AI 3.3 | 1782471606 and later (unaffected · rpm)Default: affected | redhat-SADP · adp |
| Red Hat | OpenShift Lightspeed | Default: affected | redhat-SADP · adp |
| Red Hat | Red Hat Ansible Automation Platform 2 | Default: affected | redhat-SADP · adp |
| Red Hat | Red Hat Ansible Automation Platform 2 | Default: affected | redhat-SADP · adp |
| Red Hat | Red Hat OpenShift AI (RHOAI) | Default: unaffected | redhat-SADP · adp |
Weaknesses
2- CWE-22 CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
- CWE-22 Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
References
9- https://access.redhat.com/errata/RHSA-2026:24766
- https://access.redhat.com/errata/RHSA-2026:37275
- https://access.redhat.com/errata/RHSA-2026:59159
- https://access.redhat.com/security/cve/CVE-2026-34070
- RHBZ#2453287 https://bugzilla.redhat.com/show_bug.cgi?id=2453287
- https://github.com/langchain-ai/langchain/commit/27add913474e01e33bededf4096151130ba0d47c
- https://github.com/langchain-ai/langchain/releases/tag/langchain-core==1.2.22
- https://github.com/langchain-ai/langchain/security/advisories/GHSA-qh6h-p6c9-ff54
- https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-34070.json
Provider assertions
3GitHub_M · cna
LangChain Core has Path Traversal vulnerabilites in legacy `load_prompt` functions
redhat-SADP · adp
langchain: path traversal in legacy load_prompt functions in langchain-core
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 16d6daa32e6658505716e5f18f463aed5d96625707812f74fea68aaa2b1bb8e6
- Ingested
- 23 Sep 2026, 09:10:54 UTC
- Source record
- Official CVE record