CVE-2025-68665CWE-502insecure-deserialization

CVE-2025-68665

High · published December 24, 2025

CVSS v3.1
8.6
EPSS
1%
Percentile
55.9
In the wild
Unconfirmed
What it is

⚡ A sneaky serialization injection vulnerability lurks in LangChain's toJSON() method, and it could let attackers play puppet master with your data! Think of it as a restaurant that ignores certain secret ingredient labels when preparing orders — if a customer's dish comes with a hidden ‘lc’ ingredient, the chef might mistakenly prepare it as a specialty dish instead of just a regular meal, causing chaos in the kitchen! An attacker could exploit this flaw to inject malicious data, which might allow them to manipulate or impersonate legitimate LangChain objects. This could lead to unauthorized access or data manipulation, creating a potential nightmare for your application's integrity. Imagine the disruption if a rogue ingredient turns a simple meal into a toxic concoction!

Put simply

Think of it as a restaurant that ignores certain secret ingredient labels when preparing orders — if a customer's dish comes with a hidden ‘lc’ ingredient, the chef might mistakenly prepare it as a specialty dish instead of just a regular meal, causing chaos in the kitchen! This vulnerability allows attackers to bypass expected serialization processes by injecting user-controlled data with the 'lc' key into the toJSON() method. As a result, it processes this data as a legitimate LangChain object, causing serious security implications during deserialization.

What to do

An attacker could exploit this flaw to inject malicious data, which might allow them to manipulate or impersonate legitimate LangChain objects. This could lead to unauthorized access or data manipulation, creating a potential nightmare for your application's integrity. Imagine the disruption if a rogue ingredient turns a simple meal into a toxic concoction! To protect your application, update to @langchain/core versions 0.3.80 or 1.1.8, and langchain versions 0.3.37 or 1.2.3 immediately. Additionally, audit your data handling processes to ensure all user inputs are properly sanitized and validated. Don't let sneaky inputs catch you off guard! You've got this! 🚀 Stay vigilant and secure, and you'll keep your applications safe from unwanted surprises!

The record
Technical detail
CVSS v3.1
8.6 · HIGH
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:N
CVSS v4.0
Not supplied
EPSS
0.00793 · 55.9th percentile
Weakness
CWE-502 · Deserialization of Untrusted Data
Published
2025-12-24T04:15Z
Affected products (4)
ProductVersionsFixed in
langchain/langchain.js< 0.3.370.3.37
langchain/langchain.js≥ 1.0.0, < 1.2.31.2.3
langchain/langchain\/core< 0.3.800.3.80
langchain/langchain\/core≥ 1.0.0, < 1.1.81.1.8
References (5)
EPSS history
Timeline
  • 23 DEC 22:56Z
    LangChain serialization injection vulnerability enables secret extraction
    cvelistv5