CVE-2026-34070Langchain Core
High 7.5 No auth needed
Follow: this CVE · Langchain · Langchain Core We alert you by email or Slack (account required).
- Priority
- 60
- CVSS 3.1
- 7.5
- EPSS
- —
- Auth required
- No
- Published
- Mar 31, 2026
- Updated
- Aug 25, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-22
- SSVC (CISA)
- Exploitation: proof of concept · Automatable: yes · Technical impact: partial
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
What happens
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.
What to do
- Apply the vendor's security update for Langchain Core.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| PyPI | langchain-core |
< 1.2.22 |
1.2.22 |
pip install "langchain-core>=1.2.22" |
| PyPI | langchain-core |
< 1.2.22 |
1.2.22 |
pip install "langchain-core>=1.2.22" |
Per OSV / GitHub Advisories (GHSA-qh6h-p6c9-ff54, PYSEC-2026-2193). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| langchain | langchain_core | < 1.2.22 |
Official sources
References
Links published by the sources. Open them with care.
- github.com Patch
- github.com Release Notes
- github.com Exploit Vendor Advisory
- access.redhat.com
- access.redhat.com
- access.redhat.com
- access.redhat.com
- bugzilla.redhat.com
- security.access.redhat.com