Path traversal in LangChain - CVE-2026-34070

 

Path traversal in LangChain - CVE-2026-34070

Published: April 9, 2026 / Updated: April 20, 2026


Vulnerability identifier: #VU125664
CSH Severity: Medium
CVSS v4.0: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N/E:U/U:Green
CVE-ID: CVE-2026-34070
CWE-ID: CWE-22
Exploitation vector: Remote access
Exploit availability: No public exploit available
Vendor: LangChain
Affected software:
LangChain

Detailed vulnerability description

The vulnerability allows a remote attacker to disclose sensitive information.

The vulnerability exists due to path traversal in legacy load_prompt functions in langchain_core.prompts.loading when processing user-influenced deserialized prompt configuration dictionaries. A remote attacker can supply a crafted configuration with traversal sequences or absolute paths to disclose sensitive information.

The issue is constrained by file-extension checks that limit readable files to .txt, .json, .yaml, and .yml.


How to mitigate CVE-2026-34070

Install security update from vendor's website.

Sources