ZeroHour

CVE-2025-68664

PoC mass

Serialization Injection in LangChain Core dumps()/dumpd() Exposes Secrets

CVSS 3.1
8.2 high
EPSS
43%p99
Published
()
Modified
AI analysis

LangChain (langchain-core) versions prior to 0.3.81 and 1.2.5 contain a serialization injection flaw (CWE-502) in the dumps() and dumpd() functions, which fail to escape dictionaries carrying a top-level 'lc' key when serializing free-form dictionaries. Because 'lc' is LangChain's internal marker for serialized objects, an attacker who can get user-controlled data into a serialized payload can craft a forged LangChain object that is treated as a legitimate, trusted object when the payload is later deserialized. Successful exploitation can expose secrets embedded in serialized objects and enable prompt injection or broader data exposure, with network reachability and no privileges or user interaction required (CVSS 3.1: 8.2 high, high confidentiality and low integrity impact). Any application built on LangChain Core that passes attacker-influenced dictionaries through dumps()/dumpd() and deserializes the result is affected. Exploitation has not yet been confirmed in the wild (not in CISA KEV), but a public security advisory is available and EPSS assigns a 43.4% probability of exploitation within 30 days (99th percentile).

What to do: Upgrade langchain-core to version 0.3.81 (for the 0.3.x branch) or 1.2.5 (for the 1.x branch), or later. Audit code that calls dumps()/dumpd() on data containing user-controlled dictionaries and that deserializes such output, and avoid embedding secrets in serialized payloads until patched. Review the upstream advisory (GHSA-c67j-w6g6-q2cm) for exploitation details and monitor for signs of in-the-wild abuse given the high EPSS score.

Affected
langchain coreAll versions prior to 0.3.81 (0.3.x line) and prior to 1.2.5 (1.x line); fixed in 0.3.81 and 1.2.5
Estimated exposure
massplausibly hundreds of thousands to millions of installations (LangChain Core underpins the extremely widely adopted LangChain/LangGraph AI ecosystem), though… — LangChain Core is a foundational dependency of the dominant open-source LLM-application ecosystem, which sees millions of package downloads per month per public usage data, so affected deployments plausibly number well above 100,000;…

Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.

Description

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.

Vendors
langchain
Products
langchain core
Weakness
CWE-502
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:L/A:N

In the news