CVE-2026-34070: langchain · Path Traversal
Affects langchainSource CVE Database V5
Not known to be exploited · CVSS 7.5 High : upgrade to 1.2.22 soon.
Data as of 29 Oct 2026, 19:04 UTC
- EPSS
- 1.4% chance of exploitation in 30 days – higher than 73% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
- Patch
- Available – fixed in 1.2.22
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:NExploitation evidence
Disclosed: evidence found.
CVE published 31 Mar 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponized: evidence found.
Public exploit code: GitHub proofs of concept
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), GitHub proofs of concept, the Metasploit, Exploit-DB and nuclei-templates index as of 29 Oct 2026.
What to do
Upgrade langchain to 1.2.22.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| langchain-ailangchain | Affected
| Fixed in
|
PyPIlangchainpkg:pypi/langchainOther threats | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
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.
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.
References
- github.com/langchain-ai/langchain/security/advisories/GHSA-qh6h-p6c9-ff54 (opens in a new tab)
- github.com/langchain-ai/langchain/commit/27add913474e01e33bededf4096151130ba0d47c (opens in a new tab)
- github.com/langchain-ai/langchain/releases/tag/langchain-core==1.2.22 (opens in a new tab)
- access.redhat.com/security/cve/CVE-2026-34070 (opens in a new tab)
- bugzilla.redhat.com/show_bug.cgi?id=2453287 (opens in a new tab)
- security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-34070.json (opens in a new tab)
- access.redhat.com/errata/RHSA-2026:24766 (opens in a new tab)
- access.redhat.com/errata/RHSA-2026:37275 (opens in a new tab)
- access.redhat.com/errata/RHSA-2026:59159 (opens in a new tab)