CVE-2026-34070: langchain: path traversal in legacy load_prompt functions in langchain | OX.Radar
Breaking: Ruby2Shell - Ruby Memory Corruption Flaws Expose Applications to Remote Code Execution
Read the Report
Learn How MCP Is Bypassing a Decade of Cloud Security Best Practices
Read the Report
Are you exposed? Connect a repo in minutes.
Scan your repos free

CVE-2026-34070

langchain: path traversal in legacy load_prompt functions in langchain-core

Overview

Published
31 Mar 2026
Modified
25 Aug 2026
High CVE
3 Registry packages
0 OS packages
0 Linux distributions
Yes Fix available

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

Packages affected by CVE-2026-34070
EcosystemPackageVulnerableFixed 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

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.