Vulnerability · Published Dec 23, 2025 · Assigned by GitHub_M

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

Critical 9.3

In plain English

A critical-severity unsafe deserialization in langchain from langchain-ai. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 42.9% (higher than 99% of all known vulnerabilities). Ready-made attack tooling exists: public proof-of-concept code. Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)9.3Critical
Exploit odds (30 days)42.9%top 1.3% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack tooling1Public PoC

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

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
PyPIlangchain-core1.2.5GHSA-c67j-w6g6-q2cm
PyPIlangchain-core0.3.81GHSA-c67j-w6g6-q2cm
PyPIlangchain-core0.3.81, 1.2.5PYSEC-2026-373

Affected products (as reported)

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

Weakness: CWE-502 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:L/A:N

References