Directory Traversal Vulnerability in LangChain Affects User Configurations
CVE-2026-34070

7.5HIGH

Key Information:

Status
Vendor
CVE Published:
31 March 2026

Badges

👾 Exploit Exists🟡 Public PoC

What is CVE-2026-34070?

LangChain, a framework for developing agents and large language model (LLM) applications, was found to contain a directory traversal vulnerability prior to version 1.2.22. This flaw exists in the langchain_core.prompts.loading module, where multiple functions read configuration files from paths without proper validation. Consequently, if an application uses user-influenced prompt configurations with the load_prompt() or load_prompt_from_config() functions, an attacker can exploit this vulnerability to access arbitrary files on the host filesystem. The exploitation is limited primarily by file extension checks (e.g., .txt for templates and .json/.yaml for examples). A fix has been implemented in version 1.2.22 to mitigate this risk.

Affected Version(s)

langchain < 1.2.22

Exploit Proof of Concept (PoC)

PoC code is written by security researchers to demonstrate the vulnerability can be exploited. PoC code is also a key component for weaponization which could lead to ransomware.

References

CVSS V3.1

Score:
7.5
Severity:
HIGH
Confidentiality:
High
Integrity:
None
Availability:
High
Attack Vector:
Network
Attack Complexity:
Low
Privileges Required:
None
User Interaction:
None
Scope:
Unchanged

Timeline

  • Vulnerability published

  • 🟡

    Public PoC available

  • 👾

    Exploit known to exist

  • Vulnerability Reserved

.