Skip to content
FlawDB
Sign in
Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

CVE-2025-68665

HIGH 8.6EPSS 57%

LangChain serialization injection vulnerability enables secret extraction

Also known as GHSA-r399-636x-v7f6

Mitigation

  • Upgrade @langchain/core to one of 1.1.8, 0.3.80 (or later in the same release line).
  • Upgrade langchain to one of 1.2.3, 0.3.37 (or later in the same release line).

Who should check

  • Projects that depend on npm package @langchain/core (>= 1.0.0, < 1.1.8)
  • Projects that depend on npm package langchain (>= 1.0.0, < 1.2.3)
  • Anyone running langchain-ai langchainjs @langchain/core >= 1.0.0, < 1.1.8; @langchain/core < 0.3.80; langchain >= 1.0.0, < 1.2.3; langchain < 0.3.37

Vulnerability facts

Affected
@langchain/core >= 1.0.0, < 1.1.8; langchain >= 1.0.0, < 1.2.3
Fixed in
1.1.8, 0.3.80, 1.2.3, 0.3.37
Exploited in the wild
Not in CISA KEV
Public exploit / PoC
None known
Remote exploitation
Remote, no login needed
CVSS
8.6 (v3.1, CNA)CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:N/A:NOpen in CVSS calculator
Show all 8 CVSS metrics
  • Attack vector: Network
  • Attack complexity: Low
  • Privileges required: None
  • User interaction: None
  • Scope: Changed (impact reaches other components)
  • Confidentiality impact: High
  • Integrity impact: None
  • Availability impact: None
EPSS
0.89% chance of exploitation in 30 days (percentile 57, 2026-11-26)
CWE
CWE-502
Published
Modified

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

Affected and fixed versions

Package / productAffectedFixedSource
npm @langchain/core>= 1.0.0, < 1.1.81.1.8, 0.3.80osv
npm langchain>= 1.0.0, < 1.2.31.2.3, 0.3.37osv
langchain-ai langchainjs@langchain/core >= 1.0.0, < 1.1.8; @langchain/core < 0.3.80; langchain >= 1.0.0, < 1.2.3; langchain < 0.3.37—cvelist

Check your systems with an agent

Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.

Check whether anything I run is affected by CVE-2025-68665. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-68665.md
Affected: @langchain/core >= 1.0.0, < 1.1.8; langchain >= 1.0.0, < 1.2.3
Fixed in: 1.1.8, 0.3.80, 1.2.3, 0.3.37

Steps:
1. Search this machine and project for @langchain/core (npm), langchain (npm), langchain-ai langchainjs: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.

References

FAQ

Is CVE-2025-68665 being exploited?

There is no confirmed exploitation: CVE-2025-68665 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.89% chance of exploitation in the next 30 days (as of 2026-11-26).

How serious is CVE-2025-68665?

High: CVSS 8.6 (v3.1, scored by CNA). Remote, no login needed.

Which versions are affected by CVE-2025-68665?

@langchain/core >= 1.0.0, < 1.1.8; langchain >= 1.0.0, < 1.2.3.

Is there a fix for CVE-2025-68665?

Yes. Fixed in 1.1.8, 0.3.80, 1.2.3, 0.3.37. Upgrade @langchain/core to one of 1.1.8, 0.3.80 (or later in the same release line). Upgrade langchain to one of 1.2.3, 0.3.37 (or later in the same release line).

How do I check if I'm affected by CVE-2025-68665?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

Sponsors