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

- Severity: High 7.5 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.49%, higher than 74% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-03-27T19:45:00.000Z
- Modified: 2026-09-10T03:50:40.646Z
- Also known as: GHSA-qh6h-p6c9-ff54, PYSEC-2026-2193
- Weaknesses: CWE-22
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial
- Assigned by: GitHub_M

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

(As written by CVE List.)

## Affected

- langchain-ai langchain: < 1.2.22
- ansible-automation-platform-25/lightspeed-rhel8: no versions given (not affected: from 1780082949 before *; from 1787229385 before *)
- rhoai/odh-llama-stack-core-rhel9: no versions given (not affected: from 1782471587 before *)
- rhoai/odh-trustyai-nemo-guardrails-server-rhel9: no versions given (not affected: from 1782471606 before *)
- openshift-lightspeed/lightspeed-service-api-rhel9: no versions given
- ansible-automation-platform-25/lightspeed-chatbot-rhel8: no versions given
- ansible-automation-platform-26/lightspeed-rhel9: no versions given
- rhoai/odh-mlflow-rhel9: no versions given
- langchain-core (PyPI): before 1.2.22
- langchain langchain_core: before 1.2.22

## Every score

- GitHub_M: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`
- redhat-SADP: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`
- GitHub: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`
- PyPA Advisory Database: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`

## References

- <https://github.com/langchain-ai/langchain/security/advisories/GHSA-qh6h-p6c9-ff54> (exploit, evidence, vendor-advisory, web)
- <https://github.com/langchain-ai/langchain/commit/27add913474e01e33bededf4096151130ba0d47c> (fix, patch, web)
- <https://github.com/langchain-ai/langchain/releases/tag/langchain-core==1.2.22> (advisory, release-notes, web)
- <https://access.redhat.com/security/cve/CVE-2026-34070> (vdb-entry, web)
- <https://bugzilla.redhat.com/show_bug.cgi?id=2453287> (issue-tracking, report)
- <https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-34070.json> (web)
- <https://access.redhat.com/errata/RHSA-2026:24766> (advisory, vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:59159> (vendor-advisory)
- <https://access.redhat.com/errata/RHSA-2026:37275> (advisory, vendor-advisory)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-34070> (advisory)
- <https://github.com/langchain-ai/langchain> (package)

## Sources

- CVE List: [CVE-2026-34070](https://www.cve.org/CVERecord?id=CVE-2026-34070), CVE Terms of Use, modified 2026-08-25
- GitHub Advisory Database: [GHSA-qh6h-p6c9-ff54](https://github.com/advisories/GHSA-qh6h-p6c9-ff54), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2026-34070](https://nvd.nist.gov/vuln/detail/CVE-2026-34070), Public domain, modified 2026-08-25
- PyPA Advisory Database: [PYSEC-2026-2193](https://osv.dev/vulnerability/PYSEC-2026-2193), CC-BY-4.0, modified 2026-07-13

---

Page: https://cve.day/CVE-2026-34070 · Whole record: https://cve.day/CVE-2026-34070.json · Rebuilt by cve.day 2026-11-25T22:59:17.556Z
