---
title: "CVE-2025-68664: LangChain serialization injection vulnerability enables secret extraction in dumps/loads APIs"
url: https://erroneo.us/security/cve/CVE-2025-68664/
description: "CVE-2025-68664 (langchain-core (PyPI)): LangChain is a framework for building agents and LLM-powered applications. Prior to versions 0.3.81 and 1.2.5, a…"
type: vulnerability-record
section: "Security Digest"
date_published: 2025-12-23
date_modified: 2026-10-21
publisher: erroneo.us
author: erroneo.us Security Desk
cve: "CVE-2025-68664"
kev: false
cvss: 9.3
epss: 0.4293
license: All rights reserved. Quote with attribution and a link.
---

# CVE-2025-68664: LangChain serialization injection vulnerability enables secret extraction in dumps/loads APIs

**Signal:** High exploit likelihood. EPSS ranks it in the top 5% of all CVEs for likely exploitation in the next 30 days. (Computed from CISA KEV, EPSS and CVSS; not an editorial verdict.)

## Should you act?

- Not in CISA KEV , but CISA’s SSVC assessment records a public proof-of-concept, so attack code exists.
- EPSS 42.9% , percentile 99: FIRST’s model estimates a 42.9% chance of exploitation activity in the next 30 days, higher than 99% of all scored CVEs (very high). EPSS is a probability, not a verdict.
- Remotely reachable with no login and no user interaction. If the vulnerable service is exposed to the internet, prioritize it.
- Only applies if your dependency tree includes langchain-core (PyPI) >= 1.0.0, < 1.2.5, fixed in 1.2.5 ; langchain-core (PyPI) < 0.3.81, fixed in 0.3.81 . Check your lockfile, including transitive dependencies.
- Editorial verdict: Patch this week. LangGrinch: LangChain Core Serialization Injection — A real design flaw in a library almost every Python agent stack pulls in, but it needs a serialize-then-deserialize path over attacker-influenced data; bump langchain-core in your next routine dependency update.

## What it is

LangChain is a framework for building agents and LLM-powered applications. Prior to versions 0.3.81 and 1.2.5, a serialization injection vulnerability exists in LangChain's dumps() and dumpd() functions. The functions do not escape dictionaries with 'lc' keys when serializing free-form dictionaries. The 'lc' key is used internally by LangChain to mark serialized objects. When user-controlled data contains this key structure, it is treated as a legitimate LangChain object during deserialization rather than plain user data. This issue has been patched in versions 0.3.81 and 1.2.5.

## Affected packages

- PyPI `langchain-core` >= 1.0.0, < 1.2.5 → fixed: 1.2.5
- PyPI `langchain-core` < 0.3.81 → fixed: 0.3.81

## Affected products (CVE record)

- langchain-ai langchain: >= 1.0.0, < 1.2.5, < 0.3.81

## Severity

- GitHub_M CVSS 3.1: 9.3 `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:L/A:N`
- GitHub CVSS 3.1: 9.3 `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:L/A:N`

## Exploitation

- CISA KEV: not listed (no confirmed in-the-wild exploitation known to CISA).
- CISA SSVC assessment: exploitation poc , automatable yes , technical impact partial .
- FIRST EPSS (model of 2026-10-21): 42.93% probability of exploitation activity in the next 30 days; percentile 99.

## Sources

- [GitHub Advisory GHSA-c67j-w6g6-q2cm](https://github.com/advisories/GHSA-c67j-w6g6-q2cm)
- [CVE.org record CVE-2025-68664](https://www.cve.org/CVERecord?id=CVE-2025-68664)
- [NVD entry CVE-2025-68664](https://nvd.nist.gov/vuln/detail/CVE-2025-68664)
- [github.com](https://github.com/langchain-ai/langchain/security/advisories/GHSA-c67j-w6g6-q2cm)
- [github.com](https://github.com/langchain-ai/langchain/pull/34455)
- [github.com](https://github.com/langchain-ai/langchain/pull/34458)
- [github.com](https://github.com/langchain-ai/langchain/commit/5ec0fa69de31bbe3d76e4cf9cd65a6accb8466c8)
- [github.com](https://github.com/langchain-ai/langchain/commit/d9ec4c5cc78960abd37da79b0250f5642e6f0ce6)
- [github.com](https://github.com/langchain-ai/langchain/releases/tag/langchain-core%3D%3D0.3.81)
- [github.com](https://github.com/langchain-ai/langchain/releases/tag/langchain-core%3D%3D1.2.5)

---
Source page: https://erroneo.us/security/cve/CVE-2025-68664/ · Security Digest: https://erroneo.us/security/ · More: https://erroneo.us/llms.txt
