LangChain Core serialization injection allows secret extraction (CVE-2025-68664)

CVE-2025-68664 is a critical serialization injection vulnerability in the LangChain Core Python package with a CVSS score of 9.3. It enables attackers to steal secrets and perform prompt injection via unsafe deserialization.

LangChain · Incident Dec 23, 2025 · Indexed Jun 16, 2026 · 3 sources

CVE-2025-68664 is a LangChain serialization injection flaw that enables secret extraction via unsafe deserialization.
What
CVE-2025-68664 is a critical serialization injection vulnerability in the LangChain Core Python package with a CVSS score of 9.3.
Incident date
Dec 23, 2025
Who
LangChain
Failure mode
Prompt Injection
AI surface
Agentic Workflow
Severity
High

What happened

A critical serialization injection vulnerability, identified as CVE-2025-68664, was discovered in LangChain Core. The flaw allowed for the theft of secrets and prompt injection via unsafe deserialization. Updates were subsequently released to address the issue.

What broke inside the model

Failure path · mode profile · Prompt Injection
  1. 01 · TriggerThe model reads retrieved or user-supplied text.
  2. 02 · Model stepThat text carries hidden instructions.
  3. 03 · Control gapNothing separates untrusted data from trusted commands.
  4. 04 · FailureThe injected instruction overrides the operator's.
  5. 05 · ConsequenceThe system acts on an outsider's intent.

At the injection point, retrieved text overrides the operator's instruction.

The vulnerability was caused by unsafe deserialization processes within the LangChain Core Python package. This flaw allowed attackers to perform serialization injection, enabling the extraction of secrets.

Public visibilityHigh
Regulatory exposureNone
Customer impactMany customers
Financial impactUnknown
Time to disclosureDays
  1. PrimaryCVE-2025-68664: LangChain Serialization Injectionupwind.io
  2. PressCritical LangChain Core Vulnerabilitythehackernews.com
  3. PrimaryCVE-2025-68664-LangGrinch-PoCgithub.com
Permalinkhttps://failureindex.ai/failures/langchain-core-serialization-injection-allows-secret
CitationAI Failure Index. "LangChain Core serialization injection allows secret extraction (CVE-2025-68664)" (FI-0567). Realm Labs. https://failureindex.ai/failures/langchain-core-serialization-injection-allows-secret (indexed Jun 16, 2026).
Share cardA branded image of this record for posts and slides.

Data fields CC-BY 4.0, prose citation permitted. Incident ID FI-0567. Full dataset at /data.

Note from Realm Labs, the Index steward

How Realm would have caught this

Controls for this failure mode
  • Prism
  • OmniGuard

Realm inspects the model's internal state for the signature of instructions arriving through the data channel, so an injected command can be flagged and blocked inline before the model acts on it, instead of trusting a classifier that scores the input as safe.