CVE-2026-34070 Details
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 directory traversal vulnerability has been identified in LangChain versions prior to 1.2.22. The issue arises in multiple functions within the 'langchain_core.prompts.loading' module, which read files from paths embedded in deserialized configuration dictionaries. These functions do not validate the paths against directory traversal or absolute path injection, allowing attackers to read arbitrary files from the host filesystem. The vulnerability is constrained by file-extension checks, permitting only certain types of files to be accessed. This issue affects applications that pass user-influenced prompt configurations to the 'load_prompt()' or 'load_prompt_from_config()' functions.'
Users are advised to update LangChain to version 1.2.22 or later. The updated version includes path validation that rejects absolute paths and directory traversal sequences. For applications that require loading prompts from configurations that may contain such paths, the 'allow_dangerous_paths=True' option can be used, but with caution.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Mar 31, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-22 | Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') | redhat-SADP |
| CWE-22 | Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| langchain langchain core | < 1.2.22 |
CPE
Remediation
| |
Change History
10 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Aug 25, 2026 | CVE Modified | redhat-SADP |
| Jul 15, 2026 | CVE Modified | redhat-SADP |
| Jul 10, 2026 | CVE Modified | redhat-SADP |
| Jun 30, 2026 | CVE Modified | redhat-SADP |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 1, 2026 | Reanalysis | [email protected] |
| Apr 2, 2026 | Initial Analysis | [email protected] |
| Mar 31, 2026 | CVE Modified | CISA-ADP |
| Mar 31, 2026 | New CVE Received | [email protected] |