Serialization Injection Vulnerability in LangChain Framework for LLM Applications
CVE-2025-68665

8.6HIGH

Key Information:

Vendor
CVE Published:
23 December 2025

What is CVE-2025-68665?

The LangChain framework, used for building applications powered by large language models, has a serialization injection vulnerability in its toJSON() method. This flaw affects specific versions by improperly handling objects with 'lc' keys during the serialization of user data. As a result, user-controlled data that includes this key may be misinterpreted as legitimate LangChain objects upon deserialization, posing security risks. It is essential to upgrade to @langchain/core versions 0.3.80 and 1.1.8, or langchain versions 0.3.37 and 1.2.3 to mitigate this issue.

Affected Version(s)

langchainjs @langchain/core >= 1.0.0, < 1.1.8 < @langchain/core 1.0.0, 1.1.8

langchainjs @langchain/core < 0.3.80 < @langchain/core 0.3.80

langchainjs langchain >= 1.0.0, < 1.2.3 < langchain 1.0.0, 1.2.3

References

CVSS V3.1

Score:
8.6
Severity:
HIGH
Confidentiality:
High
Integrity:
None
Availability:
High
Attack Vector:
Network
Attack Complexity:
Low
Privileges Required:
None
User Interaction:
None
Scope:
Changed

Timeline

  • Vulnerability published

  • Vulnerability Reserved

.
CVE-2025-68665 : Serialization Injection Vulnerability in LangChain Framework for LLM Applications