High severity7.5NVD Advisory· Published Mar 31, 2026· Updated Jun 1, 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- osv-coords11 versionspkg:apk/chainguard/py3.10-langchainpkg:apk/chainguard/py3.11-langchainpkg:apk/chainguard/py3.12-langchainpkg:apk/chainguard/py3.13-langchainpkg:apk/chainguard/py3-langchainpkg:apk/wolfi/py3.10-langchainpkg:apk/wolfi/py3.11-langchainpkg:apk/wolfi/py3.12-langchainpkg:apk/wolfi/py3.13-langchainpkg:apk/wolfi/py3-langchainpkg:pypi/langchain-core
< 0+ 10 more
- (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
- (no CPE)range: < 1.2.22
Patches
Vulnerability mechanics
References
5- 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
News mentions
1- Exploits and vulnerabilities in Q1 2026Securelist · May 7, 2026