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
| Ecosystem | Package | Vulnerable | First fixed |
|---|---|---|---|
| PyPI | langchain-core | >= 1.0.0, < 1.2.5 | 1.2.5 |
| PyPI | langchain-core | < 0.3.81 | 0.3.81 |
| Vendor | Product | Affected versions (per CVE record) |
|---|---|---|
| langchain-ai | langchain | >= 1.0.0, < 1.2.5, < 0.3.81 |
Severity scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| GitHub_M | 3.1 | 9.3 Critical | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:L/A:N |
| GitHub | 3.1 | 9.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
- — CVE record published by GitHub_M
- — GitHub-reviewed advisory GHSA-c67j-w6g6-q2cm published (critical)
- — erroneo.us brief: LangGrinch: LangChain Core Serialization Injection
- — CVE record last updated
Sources and references
Original sources first. Version and fix details should always be confirmed against the vendor or project advisory.
Vulnerability records
- GitHub Advisory GHSA-c67j-w6g6-q2cm github.com
- CVE.org record CVE-2025-68664 cve.org
- NVD entry CVE-2025-68664 nvd.nist.gov
Other references from the CVE record and advisory
- github.com github.com
- github.com github.com
- github.com github.com
- github.com github.com
- github.com github.com
- github.com github.com
- github.com github.com