Security Digest · Vulnerability record

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

LangChain is a framework for building agents and LLM-powered applications.

CVSS 9.3 Critical EPSS 42.9% · p99 Patch this week

Should you act?

High exploit likelihood

EPSS ranks it in the top 5% of all CVEs for likely exploitation in the next 30 days. This signal is computed from CISA KEV, EPSS and CVSS data; it is not an editorial verdict.

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

From the GitHub advisory

Summary

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.

Attack surface

The core vulnerability was in dumps() and dumpd(): these functions failed to escape user-controlled dictionaries containing 'lc' keys. When this unescaped data was later deserialized via load() or loads(), the injected structures were treated as legitimate LangChain objects rather than plain user data.

This escaping bug enabled several attack vectors:

Weakness type: CWE-502.

Product: langchain-core (PyPI) · Assigned by: GitHub_M · Published: 2025-12-23

Affected and fixed versions

EcosystemPackageVulnerableFirst fixed
PyPIlangchain-core>= 1.0.0, < 1.2.51.2.5
PyPIlangchain-core< 0.3.810.3.81
VendorProductAffected versions (per CVE record)
langchain-ailangchain>= 1.0.0, < 1.2.5, < 0.3.81

Severity scores

Scored byCVSSScoreVector
GitHub_M3.19.3 CriticalCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:L/A:N
GitHub3.19.3 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:L/A:N
  • Attack vector: network (remotely reachable)
  • Attack complexity: low
  • Privileges required: none (no login)
  • User interaction: none
  • Scope: changed (can affect other components)

CVSS measures how bad a flaw is if exploited, not how likely exploitation is. Read it next to the exploitation data below.

Exploitation and urgency

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

Timeline

Sources and references

Original sources first. Version and fix details should always be confirmed against the vendor or project advisory.

Vulnerability records

  1. GitHub Advisory GHSA-c67j-w6g6-q2cm github.com
  2. CVE.org record CVE-2025-68664 cve.org
  3. NVD entry CVE-2025-68664 nvd.nist.gov

Other references from the CVE record and advisory

  1. github.com github.com
  2. github.com github.com
  3. github.com github.com
  4. github.com github.com
  5. github.com github.com
  6. github.com github.com
  7. github.com github.com

Critical PyPI advisories · Today’s Security Digest