Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…
EPSS 1.2%top 35%

CVE-2026-34070: CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') in langchain-ai langchain

0
High
VulnerabilityCVE-2026-34070cvecve-2026-34070cwe-22
Published: 03/31/2026 (03/31/2026, 02:01:49 UTC)
Source: CVE Database V5
Vendor/Project: langchain-ai
Product: langchain

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.

CVSS v3.1

Score 7.5high

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

Affected software

langchain
pkg:pypi/langchain
Affected versions
<1.2.22

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 07/18/2026, 14:44:04 UTC

Technical Analysis

LangChain versions before 1.2.22 contain a path traversal vulnerability in multiple functions within langchain_core.prompts.loading. These functions read files from paths embedded in deserialized configuration dictionaries without proper validation against directory traversal or absolute path injection. When user-controlled prompt configurations are passed to load_prompt() or load_prompt_from_config(), an attacker can exploit this to read arbitrary files on the host filesystem, limited only by file extension checks for .txt, .json, and .yaml files. The vulnerability is tracked as CVE-2026-34070 with a CVSS v3.1 score of 7.5 (high severity). The issue has been fixed in version 1.2.22. Red Hat has published advisories confirming the vulnerability and providing remediation guidance.

Potential Impact

An attacker able to supply user-influenced prompt configurations to vulnerable functions can read arbitrary files on the host system, potentially exposing sensitive information. The impact is confidentiality loss without integrity or availability impact. The attack surface is limited by file extension restrictions to .txt, .json, and .yaml files.

Mitigation Recommendations

This vulnerability is patched in langchain version 1.2.22. Users should upgrade to version 1.2.22 or later to remediate this issue. Red Hat advisories confirm the availability of this fix. No additional mitigations are specified beyond applying the official patch.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-03-25T16:21:40.867Z
Cvss Version
3.1
State
PUBLISHED
Vendor Advisory Urls
[{"url":"https://access.redhat.com/security/cve/CVE-2026-34070","vendor":"Red Hat"},{"url":"https://access.redhat.com/errata/RHSA-2026:24766","vendor":"Red Hat"}]

Threat ID: 69cc1e09e6bfc5ba1d33b7e8

Added to database: 03/31/2026, 19:18:33 UTC

Last enriched: 07/18/2026, 14:44:04 UTC

Last updated: 07/31/2026, 19:22:58 UTC

Views: 196

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses