Skip to main content
← All vulnerabilities
CVE-2026-34070PYSEC-2026-2193GHSA-QH6H-P6C9-FF54

LangChain Core has Path Traversal vulnerabilites in legacy `load_prompt` functions

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 1.2.22
1 proof of concept on GitHub
  • Exploitation: poc
  • Automatable: yes
  • Technical impact: partial

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.

Timeline

  1. CVE published
  2. CISA SSVC assessment

    Exploitation: poc · Automatable: yes · Technical impact: partial

  3. Record last updated

Affected versions

  • langchain-ai langchain

    fixed in 1.2.22

  • langchain-corePyPI

    fixed in 1.2.22

References 4

GitHub · langchain-ai/langchain

GitHub · Rickidevs/CVE-2026-34070