CVE-2025-68664: Vulnerability in Langchain Core

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

PyPI, CWE-502

Exploitation
None confirmed
Severity
9.3 of 10
Attack likelihood
Unknown
Fix
Fixed version known
Patch deadline
No deadline set

Details

Advisory ID
GHSA-c67j-w6g6-q2cm
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:L/A:N
Weakness
CWE-502
Published
23 Dec 2025
Last change
27 Oct 2026
Ecosystem
PyPI

Affected products

Affected versions and the first fixed release

  • Langchain Core Before 0.3.81; From 1.0.0 before 1.2.5. Fixed in 0.3.81, 1.2.5

Affected packages

Vulnerable version ranges and fixed releases

  • langchain-core PyPI, Affected from 1.0.0 before 1.2.5. Fixed in 1.2.5

Advisories

Vendor and security advisories

Patches and fixes

Updates, commits and release notes

Related