Cyber Resilience

CVE-2026-34070

Path Traversal in Langchain Core ≤ 1.2.22

Public PoCPath Traversal
Published
31 March 2026
Modified
15 July 2026
Patch / advisory
CVSS Score v3.1 7.5
Click a component to see what it means
Raw vectorCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
EPSS Score 0.012 65th percentile
Risk Priority 60 floored blend · peak EPSS

Summary

CVE-2026-34070 is a high-severity Path Traversal (CWE-22) vulnerability in Langchain Langchain Core. Its CVSS base score is 7.5 (High).

Operationally, exploitation aligns with the MITRE ATT&CK technique Exploit Public-Facing Application (T1190); ranked in the top 35% of CVEs by exploit likelihood; it is not currently listed in the CISA KEV catalog; a public proof-of-concept is referenced.

This vulnerability is AI-related — categorised as NLP and Transformers; in the Privacy and Disclosure risk domain.

The strongest mitigations our analysis identified map to AC-3 (Access Enforcement) and SI-10 (Information Input Validation) — see the control section below for these in your framework.

Deeper analysis AI-assisted summary

Synthesised by an AI model from the NVD description and linked references — a reading aid, not an authoritative source.

CVE-2026-34070 is a path traversal vulnerability (CWE-22) affecting the LangChain framework, an open-source tool for building agents and LLM-powered applications. Prior to version 1.2.22, multiple functions in the langchain_core.prompts.loading module read files from paths embedded in deserialized configuration dictionaries without validation for directory traversal or absolute path injection. This flaw arises when applications invoke load_prompt() or load_prompt_from_config() with user-influenced prompt configurations, enabling unauthorized file access on the host filesystem, limited only by file extension checks (.txt for templates, .json/.yaml for examples). The vulnerability carries a CVSS v3.1 base score of 7.5 (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N), indicating high confidentiality impact.

A remote, unauthenticated attacker can exploit this issue by supplying a maliciously crafted prompt configuration dictionary to a vulnerable LangChain application. If the application deserializes and passes this input to the affected loading functions, the attacker can traverse directories or inject absolute paths to read sensitive files accessible to the host process. Exploitation requires no privileges or user interaction, making it suitable for automated attacks over the network, though success depends on the application's handling of external prompt data.

The issue was addressed in LangChain version 1.2.22, as detailed in the project's security advisory (GHSA-qh6h-p6c9-ff54), release notes, and the patching commit (27add913474e01e33bededf4096151130ba0d47c). Security practitioners should upgrade to 1.2.22 or later and audit applications for safe handling of user-supplied prompt configurations to prevent deserialization of untrusted inputs.

OWASP Top 10 for Web (2025)

EU & UK References

Vulnerability Data

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…

more

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.

CWE(s)

AI Security AnalysisAI

AI Category
NLP and Transformers
Risk Domain
Privacy and Disclosure
OWASP Top 10 for LLMs 2025
None mapped
Classification Reason
Matched keywords: langchain, llm

Related Threats

MITRE ATT&CK Enterprise Techniques

T1190 Exploit Public-Facing Application Initial Access
Adversaries may attempt to exploit a weakness in an Internet-facing host or system to initially access a network.
Derived from this CVE’s CWE(s) via the direct CWE→ATT&CK cross-walk.

CVEs Like This One

CVE-2024-3571Same vendor: Langchain
CVE-2024-28088Same vendor: Langchain
CVE-2026-7020Shared CWE-22
CVE-2025-6854Shared CWE-22
CVE-2025-6853Shared CWE-22
CVE-2026-4944Shared CWE-22
CVE-2026-43624Shared CWE-22
CVE-2026-41863Shared CWE-22
CVE-2024-21799Shared CWE-22
CVE-2025-6855Shared CWE-22

Affected Assets

langchain
langchain core
≤ 1.2.22

Mitigating Controls

Control response

Prevent
Stop it (NIST 800-53)

Detect
Catch it (NIST detect / respond)

Harden
Shrink the surface (DISA STIG)

Validate
Prove the fix (OWASP ASVS)
  • V5.3.2

Mitigating Controls (NIST 800-53 r5) AI

Enforces the intended directory access authorizations that path traversal would otherwise bypass.

Input validation directly neutralizes special path elements before pathname construction occurs.

Least privilege reduces the impact of any unauthorized file access obtained via traversal.

Mitigating Controls (NIST CSF 2.0) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→CSF cross-walk (authority under review) — links open the control.

PR.PS-02 partial match
prevents

Patching/maintenance can remediate known path-traversal flaws in deployed software (partial prevention of exploitability) but does nothing to stop the coding defect from being introduced in the first place.

PR.AA-05 none match
prevents

PR.AA-05 defines and reviews access policies but does not address code-level pathname neutralization, so neither direction prevents CWE-22.

Mitigating Controls (ISO/IEC 27001:2022 Annex A) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→ISO cross-walk (authority under review) — links open the control.

finds

Security testing in development catches path traversal via static/dynamic analysis.

prevents

Secure SDLC mandates input validation and path sanitization that directly prevent path traversal.

prevents

Application security requirements include rules for safe file handling and canonicalization.

prevents

Secure architecture principles require least-privilege file access and directory isolation.

prevents

Secure coding standards explicitly forbid unsafe path construction and mandate safe APIs.

mitigates

Information access restriction limits which files an application may read or write.

References