---
id: CVE-2026-34070
title: LangChain is a framework for building agents and LLM-powered applications
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
  again…
severity: high
cvss: 7.5
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N'
cwe:
  - CWE-22
vendor: langchain
product: langchain_core
affected:
  - langchain_core < 1.2.22
patched:
  - langchain_core 1.2.22
published: '2026-03-31'
updated: '2026-07-10'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-34070'
references:
  - url: >-
      https://github.com/langchain-ai/langchain/commit/27add913474e01e33bededf4096151130ba0d47c
    label: security-advisories@github.com
  - url: >-
      https://github.com/langchain-ai/langchain/releases/tag/langchain-core==1.2.22
    label: security-advisories@github.com
  - url: >-
      https://github.com/langchain-ai/langchain/security/advisories/GHSA-qh6h-p6c9-ff54
    label: security-advisories@github.com
  - url: 'https://access.redhat.com/errata/RHSA-2026:24766'
    label: 0b0ca135-0b70-47e7-9f44-1890c2a1c46c
  - url: 'https://access.redhat.com/errata/RHSA-2026:37275'
    label: 0b0ca135-0b70-47e7-9f44-1890c2a1c46c
  - url: 'https://access.redhat.com/security/cve/CVE-2026-34070'
    label: 0b0ca135-0b70-47e7-9f44-1890c2a1c46c
  - url: 'https://bugzilla.redhat.com/show_bug.cgi?id=2453287'
    label: 0b0ca135-0b70-47e7-9f44-1890c2a1c46c
  - url: >-
      https://github.com/langchain-ai/langchain/security/advisories/GHSA-qh6h-p6c9-ff54
    label: 134c704f-9b21-4f2e-91b3-4a467353bcc0
  - url: >-
      https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-34070.json
    label: 0b0ca135-0b70-47e7-9f44-1890c2a1c46c
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2026-34070'
  - url: 'https://github.com/langchain-ai/langchain'
tags:
  - nvd
  - exploit-available
  - osv
  - pip
epss: 0.01213
epssPercentile: 0.67188
ingestedAt: '2026-07-10T13:03:45.535Z'
exploits:
  github: 1
  githubRepos:
    - 'https://github.com/Rickidevs/CVE-2026-34070'
  checkedAt: '2026-09-25T08:20:55.341Z'
exploitAvailable: true
aliases:
  - GHSA-qh6h-p6c9-ff54
  - PYSEC-2026-2193
ecosystem: pip
---

## Overview

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

- `langchain_core < 1.2.22`

## Remediation

Upgrade past the affected range:

- `langchain_core 1.2.22`

## Package advisory (CVE-2026-34070)

Affected packages:

- `langchain-core < 1.2.22`

Patched in:

- `langchain-core 1.2.22`

Source: https://osv.dev/vulnerability/GHSA-qh6h-p6c9-ff54
