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

> CVE-2026-34070: LangChain Core has Path Traversal vulnerabilites in legacy `load_prompt` functions. CVSS 7.5 (CVSS 3.1).

Canonical: https://rewindex.com/cve/CVE-2026-34070
Last updated: 2026-08-25T13:18:38Z

- Published: 2026-03-31 02:01 UTC · Updated: 2026-08-25 13:18 UTC · Assigner: GitHub\_M
- CVSS: 7.5 (CVSS 3.1) · Severity: High · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
- EPSS: 1.4%, 72th percentile (scored 2026-10-25)
- CISA KEV: no
- CWE: CWE-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.

## Affected vendors and products

- langchain-ai: langchain
- Red Hat: OpenShift Lightspeed
- Red Hat: Red Hat Ansible Automation Platform 2
- Red Hat: Red Hat Ansible Automation Platform 2.5
- Red Hat: Red Hat OpenShift AI 3.3
- Red Hat: Red Hat OpenShift AI (RHOAI)

## Tracked companies

- [LangChain (LangSmith)](https://rewindex.com/company/langchain-langsmith.md)

## References

- [CVE record on cve.org](https://www.cve.org/CVERecord?id=CVE-2026-34070)
- [NVD entry](https://nvd.nist.gov/vuln/detail/CVE-2026-34070)
- [https://github.com/langchain-ai/langchain/commit/27add913474e01e33bededf4096151130ba0d47c](https://github.com/langchain-ai/langchain/commit/27add913474e01e33bededf4096151130ba0d47c)
- [https://github.com/langchain-ai/langchain/releases/tag/langchain-core==1.2.22](https://github.com/langchain-ai/langchain/releases/tag/langchain-core==1.2.22)
- [https://github.com/langchain-ai/langchain/security/advisories/GHSA-qh6h-p6c9-ff54](https://github.com/langchain-ai/langchain/security/advisories/GHSA-qh6h-p6c9-ff54)

---

_Sources: CVE records from the CVE Program (cve.org). CVE® is a registered trademark of The MITRE Corporation. (https://www.cve.org/) This product uses data from the NVD API but is not endorsed or certified by the NVD. (https://nvd.nist.gov/) Known Exploited Vulnerabilities catalog from CISA. (https://www.cisa.gov/known-exploited-vulnerabilities-catalog) EPSS scores from FIRST (Exploit Prediction Scoring System). (https://www.first.org/epss/)_


---
Canonical: https://rewindex.com/cve/CVE-2026-34070 · Markdown: https://rewindex.com/cve/CVE-2026-34070.md · JSON: https://rewindex.com/api/v1/cves/CVE-2026-34070 · Data licensed CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) · Generated 2026-10-26T03:10:57.717Z
