CVE-2025-68665 Details
Description
LangChain is a framework for building LLM-powered applications. Prior to @langchain/core versions 0.3.80 and 1.1.8, and prior to langchain versions 0.3.37 and 1.2.3, a serialization injection vulnerability exists in LangChain JS's toJSON() method (and subsequently when string-ifying objects using JSON.stringify(). The method did not escape objects with 'lc' keys when serializing free-form data in kwargs. 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 @langchain/core versions 0.3.80 and 1.1.8, and langchain versions 0.3.37 and 1.2.3
A serialization injection vulnerability has been identified in LangChain JS, specifically in the `toJSON()` method. This issue affects versions of LangChain prior to 0.3.80 and 1.2.3, as well as @langchain/core versions prior to 1.1.8. The vulnerability arises because the `toJSON()` method did not properly escape objects containing 'lc' keys when serializing free-form data in keyword arguments. The 'lc' key is used internally by LangChain to identify serialized objects. As a result, user-controlled data with this key structure could be misinterpreted as a legitimate LangChain object during deserialization, rather than as plain user data.
Users can update to LangChain versions 1.2.3 or later, or @langchain/core versions 1.1.8 or later, to address this vulnerability. After updating, be cautious with the 'secretsFromEnv' option, which now defaults to false. If needed, secrets can be loaded from environment variables or specified through the 'secretsMap' option.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed Dec 24, 2025References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-502 | Deserialization of Untrusted Data | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| langchain langchain.js | < 0.3.37 >= 1.0.0, < 1.2.3 |
CPE
Remediation
| |
| langchain langchain/core | < 0.3.80 >= 1.0.0, < 1.1.8 |
CPE
Remediation
| |
Change History
5 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Jan 13, 2026 | Initial Analysis | [email protected] |
| Dec 24, 2025 | CVE Modified | CISA-ADP |
| Dec 23, 2025 | New CVE Received | [email protected] |