CVE-2026-34070

LangChain Core has Path Traversal vulnerabilites in legacy `load_prompt` functions

Published Mar 31, 2026 CVSS 3.1 · 7.5 High EPSS 1.4% KEV · Not listed
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.

Remediation

No solution or workaround provided in the CVE record

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-qh6h-p6c9-ff54 LangChain Core has Path Traversal vulnerabilites in legacy `load_prompt` functions
History
Type Values Removed Values Added
First Time appeared Langchain langchain Core
CPEs cpe:2.3:a:langchain:langchain:*:*:*:*:*:*:*:* cpe:2.3:a:langchain:langchain_core:*:*:*:*:*:python:*:*
Vendors & Products Langchain langchain
Langchain langchain Core
Type Values Removed Values Added
First Time appeared Langchain
Langchain langchain
CPEs cpe:2.3:a:langchain:langchain:*:*:*:*:*:*:*:*
Vendors & Products Langchain
Langchain langchain
Type Values Removed Values Added
First Time appeared Langchain-ai
Langchain-ai langchain
Vendors & Products Langchain-ai
Langchain-ai langchain
References
Metrics threat_severity

None

threat_severity

Important

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
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.
Title LangChain Core has Path Traversal vulnerabilites in legacy `load_prompt` functions
Weaknesses CWE-22
References
Metrics cvssV3_1

{'score': 7.5, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N'}

Weaknesses

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Aug 25, 2026, 12:05 PM
Reserved
Mar 25, 2026, 4:21 PM
Status
Modified
Published
Mar 31, 2026, 3:15 AM
Modified
Aug 25, 2026, 1:18 PM
Severity
Important
Public date
Mar 31, 2026, 2:01 AM