CVE-2025-68664CWE-502insecure-deserialization

CVE-2025-68664

Critical · published December 24, 2025

CVSS v3.1
9.3
EPSS
43%
Percentile
98.7
In the wild
Unconfirmed
What it is

🔥 A sneaky serialization injection in LangChain could turn user data into a recipe for disaster! Think of it like a restaurant serving dishes with secret ingredients hidden in the menu. If the chef isn’t careful about what goes into the pot, a seemingly innocent order could lead to a culinary catastrophe! An attacker could manipulate serialized data to insert unauthorized objects into your application, potentially gaining control over it. This could lead to exploits like data leakage or even complete system compromise, with devastating consequences for your users and their data!

Put simply

Think of it like a restaurant serving dishes with secret ingredients hidden in the menu. If the chef isn’t careful about what goes into the pot, a seemingly innocent order could lead to a culinary catastrophe! This vulnerability arises from LangChain's dumps() and dumpd() functions failing to escape dictionaries containing 'lc' keys when serializing free-form dictionaries. Consequently, user data may be wrongly treated as legitimate LangChain objects upon deserialization, allowing for unauthorized functionality execution.

What to do

An attacker could manipulate serialized data to insert unauthorized objects into your application, potentially gaining control over it. This could lead to exploits like data leakage or even complete system compromise, with devastating consequences for your users and their data! Upgrade to LangChain versions 0.3.81 or 1.2.5 to patch this vulnerability immediately. Additionally, consider auditing your serialization processes to ensure that user data is adequately validated and sanitized. Implement strict controls around data handling to mitigate similar risks in the future. You've got this! Just follow these steps, and you'll fortify your application against this sneaky injection! 🛡️

The record
Technical detail
CVSS v3.1
9.3 · CRITICAL
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:L/A:N
CVSS v4.0
Not supplied
EPSS
0.42930 · 98.7th percentile
Weakness
CWE-502 · Deserialization of Untrusted Data
Published
2025-12-24T04:15Z
Affected products (2)
ProductVersionsFixed in
langchain/langchain_core< 0.3.810.3.81
langchain/langchain_core≥ 1.0.0, < 1.2.51.2.5
References (8)
EPSS history
Timeline
  • 23 DEC 22:47Z
    LangChain serialization injection vulnerability enables secret extraction in dumps/loads APIs
    cvelistv5