CVE-2026-34070: Langchain Core Path Traversal

CVE-2026-34070

NVDCVSS scored by security-advisories@github.com

Vulnerability Summary

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.
Severity Level
HIGH(7.5)
Published Date
Mar 31, 2026
Last Modified
Aug 25, 2026
Exploitation Status
Public exploit available
EPSS Score (30-Day)
1.38%Probability
Root Weakness (CWE)
The software uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory.
CVSS v3.1 Base Metrics — Score 7.5 (HIGH)
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Attack VectorNetwork
Attack ComplexityLow
Privileges RequiredNone
User InteractionNone
ScopeUnchanged
ConfidentialityHigh
IntegrityNone
AvailabilityNone

Affected & Patched Versions

Affected Versions
  • Langchain Core < 1.2.22
  • langchain-ai langchain < 1.2.22
Patched Versions
  • Langchain Core 1.2.22

What to do

Prioritize this fix. Exploit code is public, so attacks can follow quickly.

  1. Check whether you run Langchain Core and which version.
  2. Update to a patched version listed above, then confirm the new version.
  3. Review logs and exposed services for signs of earlier compromise.

Timeline

  • Mar 31, 2026Published
  • Aug 25, 2026Record last modified

Score, severity and exploitation changes are tracked from the day Watchtower started logging them.

Get notified about new Langchain Core CVEsYou are reading CVE-2026-34070. Get an email when KEV listings, exploits or new CVEs match your stack.
Set up CVE alerts

Data last checked: Dec 1, 2026 14:13 UTC