CVE Feed
7.5 High

LangChain is a framework for building agents and LLM-powered applications.

CVE-2026-34070

Summary Multiple functions in langchaincore.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 loadprompt() or loadpromptfromconfig(), an attacker can read arbitrary files on the host filesystem, constrained only by file-extension checks (.txt for templates, .json/.yaml for examples). Note: The affected functions (loadprompt, loadpromptfromconfig, and the .save() method on prompt classes) are undocumented legacy APIs. They are superseded by the dumpd/dumps/load/loads serialization APIs in langchaincore.load, which do not perform filesystem reads and use an allowlist-based security model. As part of this fix, the legacy APIs have been formally deprecated and will be removed in 2.0.0. Affected component Package: langchain-core File: langchaincore/prompts/loading.py Affected functions: loadtemplate(), loadexamples(), loadfewshotprompt() Severity High The score reflects the file-extension constraints that limit which files can be read. Vulnerable code paths | Config key | Loaded by | Readable extensions | |---|---|---|…

Proof-of-concept code is published

Public PoC

Signals come from Exploit-DB, Metasploit, Nuclei and published proof-of-concept repositories. Their absence means nothing was found, not that nothing exists.

Part of the AI stack

This affects LangChain, in Agent frameworks.

Assessment

CVSS
7.5 (v3.1)
Severity
High
EPSS
1.44% chance of exploitation in the next 30 days
Known exploited
Not listed in CISA KEV
Exploit availability
Public PoC
Published
27 March 2026
Last updated
25 August 2026
Weakness
CWE-22
Assigner
security-advisories@github.com

CVSS vectorCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N

At the source

References

Community proofs of concept

No community proof of concept yet. If you have one for a published vulnerability and the right to share it, add it below — it will appear here once reviewed.

Submit a proof of concept
Before you submit *

Query this programmatically

Agents can read this through the MCP endpoint, or over HTTP:

curl https://cve.zerocrew.in/api/cve/CVE-2026-34070