High severity7.5NVD Advisory· Published Mar 31, 2026· Updated Jul 15, 2026
CVE-2026-34070
CVE-2026-34070
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.
AI Insight
LLM-synthesized narrative grounded in this CVE's description and references.
Affected packages
Versions sourced from the GitHub Security Advisory.
| Package | Affected versions | Patched versions |
|---|---|---|
langchain-corePyPI | < 1.2.22 | 1.2.22 |
Affected products
12- ghsa-coords11 versionspkg:pypi/langchain-corepkg:apk/chainguard/py3-langchainpkg:apk/chainguard/py3.10-langchainpkg:apk/chainguard/py3.11-langchainpkg:apk/chainguard/py3.12-langchainpkg:apk/chainguard/py3.13-langchainpkg:apk/wolfi/py3.10-langchainpkg:apk/wolfi/py3.11-langchainpkg:apk/wolfi/py3.12-langchainpkg:apk/wolfi/py3-langchainpkg:apk/wolfi/py3.13-langchain
< 1.2.22+ 10 more
- (no CPE)range: < 1.2.22
- (no CPE)range: < 0
- (no CPE)range: < 0
- (no CPE)range: < 0
- (no CPE)range: < 0
- (no CPE)range: < 0
- (no CPE)range: < 0
- (no CPE)range: < 0
- (no CPE)range: < 0
- (no CPE)range: < 0
- (no CPE)range: < 0
Patches
Vulnerability mechanics
References
10- github.com/langchain-ai/langchain/commit/27add913474e01e33bededf4096151130ba0d47cnvdPatchWEB
- github.com/langchain-ai/langchain/security/advisories/GHSA-qh6h-p6c9-ff54nvdExploitVendor AdvisoryWEB
- github.com/advisories/GHSA-qh6h-p6c9-ff54ghsaADVISORY
- nvd.nist.gov/vuln/detail/CVE-2026-34070ghsaADVISORY
- github.com/langchain-ai/langchain/releases/tag/langchain-core==1.2.22nvdRelease NotesWEB
- access.redhat.com/errata/RHSA-2026:24766nvd
- access.redhat.com/errata/RHSA-2026:37275nvd
- access.redhat.com/security/cve/CVE-2026-34070nvd
- bugzilla.redhat.com/show_bug.cginvd
- security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-34070.jsonnvd
News mentions
1- Exploits and vulnerabilities in Q1 2026Securelist · May 7, 2026