CVE-2026-34070
langchain: path traversal in legacy load_prompt functions in langchain-core
Overview
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.
Source: OX vulnerability database
Severity
7.5 · HIGH
CVSS 3.1 base score, scored by NVD.
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- None
- User interaction
- None
- Scope
- Unchanged
- Confidentiality
- High
- Integrity
- None
- Availability
- None
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Weakness: CWE-22
Affected packages · 3
| Ecosystem | Package | Vulnerable | Fixed in |
|---|---|---|---|
| PyPI | langchain-core | <1.2.22 | 1.2.22 |
| Seal PyPI | langchain-core | >=0.1.23+sp0, <0.1.23+sp999 | 0.1.23+sp999 |
| Seal PyPI | seal-langchain-core | >=0.1.23+sp1, <0.1.23+sp999 | 0.1.23+sp999 |
Open a package to see all its vulnerabilities.
Operating systems
No Linux distribution reports this ID.
References
- access.redhat.com https://access.redhat.com/errata/RHSA-2026:24766
- access.redhat.com https://access.redhat.com/errata/RHSA-2026:37275
- access.redhat.com https://access.redhat.com/errata/RHSA-2026:59159
- access.redhat.com https://access.redhat.com/security/cve/CVE-2026-34070
- bugzilla.redhat.com https://bugzilla.redhat.com/show_bug.cgi?id=2453287
- github.com https://github.com/langchain-ai/langchain
- github.com https://github.com/langchain-ai/langchain/commit/27add913474e01e33bededf4096151130ba0d47c
- github.com https://github.com/langchain-ai/langchain/releases/tag/langchain-core==1.2.22
- github.com https://github.com/langchain-ai/langchain/security/advisories/GHSA-qh6h-p6c9-ff54
- nvd.nist.gov https://nvd.nist.gov/vuln/detail/CVE-2026-34070
OX Radar and Response Center
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.