Skip to main content

deepmerge-ts CVE-2026-40345

| EUVDEUVD-2026-63468 HIGH
Uncontrolled Recursion (CWE-674)
2026-08-17 https://github.com/RebeccaStevens/deepmerge-ts GHSA-ggr8-5vv4-36mx
8.2
CVSS 4.0 · Vendor: https://github.com/RebeccaStevens/deepmerge-ts
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Supply circular object graph via API input
  2. Delivery
    Application passes both objects to deepmerge-ts
  3. Exploit
    Recursive merge re-enters same object pair
  4. Execution
    Call stack exhausted synchronously
  5. Persist
    Node.js worker process crashes
  6. Impact
    Service unavailable until supervisor restarts worker

Vulnerability Assessment

Weakness
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Recursion depth limits
Exploitation Conditions

Exploitation requires that both of the objects passed to a deepmerge-ts merge function contain circular (self-referential) references at the same property path - for example, obj.self = obj on both the left and right inputs. Plain JSON payloads delivered over HTTP cannot produce this condition because JSON.parse does not create circular references. The attack surface is limited to code paths where: (1) the application calls deepmerge-ts on at least two objects that are either constructed programmatically with back-references, or derived from a deserialization format that supports cycles; and (2) attacker-supplied data influences one or both of those objects. Authentication level is not a limiting factor imposed by the library itself - exploitation depends entirely on whether attacker-controlled data reaches the merge call. The circular-graph precondition is the primary real-world constraint that limits exposure compared to the network-reachable CVSS vector might otherwise suggest.

Impact

The CVSS 4.0 vector (AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H) scores 8.2 and reflects network reachability with zero authentication and high availability impact, moderated by AT:P - a specific attack precondition requiring that circular object graphs actually reach the deepmerge-ts API call. This precondition is the critical triage gate: applications that only pass JSON.parse() output are not reachable. Applications that construct or relay circular JS objects from any untrusted source - multipart form parsers, internal GraphQL resolvers, plugin or middleware pipelines - are genuinely at risk. No KEV listing reduces urgency for most environments, but the publicly available PoC lowers the skill bar for exploitation. The synchronous crash path is particularly damaging in single-threaded Node.js workers, where one malicious request can take down the entire process until a supervisor restarts it, enabling sustained disruption.

Exploit ScenarioDerived

An attacker submits a request to a Node.js API endpoint whose handler reconstructs user-supplied data into a JavaScript object graph - for instance, a form-body parser or a GraphQL mutation resolver that builds nested objects with back-references. The handler then calls deepmerge(userObject, defaultConfig) where both objects contain a shared self-referential key path. The merge routine recurses infinitely, exhausting the call stack synchronously, crashing the worker process. A public PoC demonstrating this exact pattern is included in the GitHub advisory.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.6% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv2 – Aug 20, 2026

Stack exhaustion denial-of-service in deepmerge-ts crashes Node.js processes when attacker-controlled recursive object graphs are passed to deepmerge(), deepmergeInto(), deepmergeCustom()(), or deepmergeIntoCustom()(). All versions prior to 8.0.0 lack cycle detection in the recursive record-merge routine, allowing two self-referencing objects sharing a key path to drive the process into infinite recursion until the Node.js runtime throws RangeError: Maximum call stack size exceeded. A public proof-of-concept is included in the GitHub security advisory; no CISA KEV listing exists at time of analysis.

Earlier versions of this analysis (1)
v1 Aug 17, 2026 - 13:51

Stack exhaustion in deepmerge-ts before v8.0.0 allows any caller supplying self-referential object graphs to crash a Node.js service by triggering unbounded recursion inside the library's merge engine. The public merge API functions - deepmerge, deepmergeInto, deepmergeCustom, and deepmergeIntoCustom - lack visited-object tracking or cycle detection, so when both inputs carry a self-referential property at the same key path, the library re-enters the same object pair forever until V8 raises RangeError: Maximum call stack size exceeded. A publicly available proof-of-concept exploit exists; no CISA KEV listing has been identified, and the fix shipped in v8.0.0 on 2026-08-16.

RemediationAI

Upgrade deepmerge-ts to version 8.0.0 or later, which introduces circular-reference support configurable via a new maxDepth option and a mergeCircularReferences merge-function option; see the security advisory at https://github.com/RebeccaStevens/deepmerge-ts/security/advisories/GHSA-ggr8-5vv4-36mx and the release notes at https://github.com/RebeccaStevens/deepmerge-ts/releases/tag/v8.0.0. Note that v8.0.0 is a major release with breaking changes: Map values are now deep-merged by default (opt out with deepmergeCustom({ mergeMaps: false })), DeepMergeMetaMetaData is renamed to DeepMergeMergeInfo, and DeepMergeIntoFunctionUtils is renamed to DeepMergeIntoUtils with no backwards-compatible alias. If an immediate upgrade is not feasible, the specific compensating control is to validate all inputs for circular references before calling any deepmerge-ts function - for example, using a JSON serialize-and-parse round-trip to strip cycles, or running a depth-limited traversal check; the trade-off is added latency and the inability to intentionally merge circular structures.

Affected VersionsENISA

deepmerge-ts < 8.0.0

Affected Packages

npm deepmerge-ts fix: 8.0.0

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in npm

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

CWE-674 (Uncontrolled Recursion) describes the root cause: the library's record-merge kernel iterates over enumerable keys and immediately recurses on collected property values with no visited-object tracking, pair tracking, or depth limit. When both merged objects contain a self-referential property at the same path - for example left.self = left and right.self = right - the merge routine re-encounters the same object pair on every recursive call and never converges. The affected package is pkg:npm/deepmerge-ts, all releases before 8.0.0. The condition cannot be triggered by plain JSON deserialization alone because JSON.parse cannot produce circular references; it requires JavaScript object graphs built programmatically or through frameworks that preserve reference cycles.

Know when Node.js gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/RebeccaStevens/deepmerge-ts) PRIMARY 8.2 HIGH
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
vuln.today AI 5.9 MEDIUM

AC:H reflects the meaningful precondition that circular JS object graphs must reach the API; no confidentiality or integrity impact applies.

3.1 AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
4.0 AV:N/AC:L/AT:P/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N

Primary rating from Vendor (https://github.com/RebeccaStevens/deepmerge-ts).

CVSS VectorVendor: https://github.com/RebeccaStevens/deepmerge-ts

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
None
Vulnerable system: Integrity
None
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

3
Analysis Updated
Aug 20, 2026 - 17:31 vuln.today
v2 - CVSS changed
CVSS changed
Aug 20, 2026 - 17:22 NVD
8.2 (HIGH)
CVE Published
Aug 17, 2026 - 13:32 cve.org
HIGH

DescriptionCVE.org

Summary

deepmerge() and deepmergeInto() can be crashed with a crafted recursive object graph. When both merged values contain self-references at the same property path, the library recurses until Node throws RangeError: Maximum call stack size exceeded.

Details

Record merging is implemented recursively. For each enumerable key, the library collects the values from every input object and immediately calls the same merge routine on that property.

There is no visited-object tracking, pair tracking, or cycle detection in that recursion. As a result, if two merged records both point back to themselves through the same key path, the merge logic keeps revisiting the same object pair forever.

This is reachable through the real public API:

  • deepmerge(...)
  • deepmergeCustom(...)(...)
  • deepmergeInto(target, ...)
  • deepmergeIntoCustom(...)(target, ...)

The issue only occurs when recursive object graphs are supplied. Plain JSON alone does not create this condition.

PoC

js
import { deepmerge, deepmergeInto } from "deepmerge-ts";

const left = {};
left.self = left;

const right = {};
right.self = right;

try {
  deepmerge(left, right);
} catch (error) {
  console.log(error.name, error.message);
  // Expected: the merge should reject or safely handle recursive input without exhausting the stack.
  // Vulnerable behavior: RangeError Maximum call stack size exceeded
}

const target = {};
target.self = target;

const source = {};
source.self = source;

try {
  deepmergeInto(target, source);
} catch (error) {
  console.log(error.name, error.message);
  // Expected: the merge should reject or safely handle recursive input without exhausting the stack.
  // Vulnerable behavior: RangeError Maximum call stack size exceeded
}

Impact

Applications that pass attacker-controlled recursive object graphs into these APIs can be forced into a synchronous crash path. In Node.js services, that can terminate request handling for the affected process or trigger repeated worker restarts until the malicious input is blocked.

Executive ViewAI

Why It Matters

deepmerge-ts versions prior to 8.0.0 contain a stack exhaustion vulnerability that allows attackers to crash Node.js applications through malicious recursive object inputs, with publicly available exploit code. Organizations using this library in production face immediate denial-of-service risk. Vendor patch is available.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.6%
Top 56% exploitable
Prevalence
Medium
popular TypeScript deep-merge utility on npm, common in TS/JS projects
Threat Intel
1
1 source
Exploit
POC
Public exploit code exists
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC Yes
EPSS 0.6%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Out-of-Cycle
Exploitation· derived
Poc
System Exposure· derived
Open
Automatable· derived
Yes
Human Impact
High

Priority Score

62
Low Medium High Critical
KEV: 0
EPSS: +1
CVSS: +41
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Denial of Service attacks render applications or systems unavailable by overwhelming resources or triggering failure conditions.

CVE-2025-68613 HIGH POC
8.8 Dec 19

Remote code execution in n8n's workflow expression evaluation system allows an authenticated user with workflow creation

CVE-2024-41713 CRITICAL POC
9.1 Oct 21

A vulnerability in the NuPoint Unified Messaging (NPM) component of Mitel MiCollab through 9.8 SP1 FP2 (9.8.1.201) could

CVE-2024-55591 CRITICAL POC
9.8 Jan 14

FortiOS and FortiProxy contain an authentication bypass via the Node.js websocket module allowing unauthenticated remote

CVE-2023-44487 HIGH POC
7.5 Oct 10

Denial of service against HTTP/2 server implementations allows remote unauthenticated attackers to exhaust server resour

CVE-2014-7205 CRITICAL POC
10.0 Oct 08

Eval injection vulnerability in the internals.batch function in lib/batch.js in the bassmaster plugin before 1.5.2 for t

CVE-2025-59528 CRITICAL POC
10.0 Sep 22

Flowise version 3.0.5 contains a remote code execution vulnerability in the CustomMCP node. The mcpServerConfig paramete

CVE-2017-14849 HIGH POC
7.5 Sep 28

Node.js 8.5.0 before 8.6.0 allows remote attackers to access unintended files, because a change to ".." handling was inc

CVE-2017-5941 CRITICAL POC
9.8 Feb 09

An issue was discovered in the node-serialize package 0.0.4 for Node.js. Rated critical severity (CVSS 9.8), this vulner

CVE-2014-0224 HIGH POC
7.4 Jun 05

OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph

CVE-2014-3744 HIGH POC
7.5 Oct 23

Directory traversal vulnerability in the st module before 0.2.5 for Node.js allows remote attackers to read arbitrary fi

CVE-2014-9566 HIGH POC
7.5 Mar 10

Multiple SQL injection vulnerabilities in the Manage Accounts page in the AccountManagement.asmx service in the Solarwin

CVE-2024-35286 CRITICAL POC
9.8 Oct 21

A vulnerability in NuPoint Messenger (NPM) of Mitel MiCollab through 9.8.0.33 allows an unauthenticated attacker to cond

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy