Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

Deepmerge ts: DeepmergeTS has stack exhaustion when merging recursive object graphs (CVE-2026-40345)

0
High
Published: 08/17/2026 (08/17/2026, 13:32:13 UTC)
Source: GCVE Database
Product: deepmerge-ts

Description

The deepmerge-ts library versions prior to 8.0.0 contain a vulnerability where merging recursive object graphs causes unbounded recursion, leading to a stack exhaustion crash. This occurs because the merge functions do not detect cycles or track visited objects, resulting in a RangeError due to maximum call stack size exceeded. This can cause Node.js applications using these APIs to crash synchronously when attacker-controlled recursive objects are merged.

CVSS v4.0

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
Present
Privileges Required
None
User Interaction
None
Vuln. Confidentiality
None
Vuln. Integrity
None
Vuln. Availability
High
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
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

Affected software

npmghsa
deepmerge-ts
Affected versions
<8.0.0

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 08/17/2026, 16:27:57 UTC

Technical Analysis

The deepmerge-ts library's merge functions (deepmerge, deepmergeInto, and their custom variants) recursively merge enumerable keys from input objects without cycle detection or tracking of visited object pairs. When both input objects contain self-references at the same property path, the recursion never terminates, causing a stack overflow and a RangeError in Node.js. This vulnerability affects versions prior to 8.0.0 and can be triggered by supplying crafted recursive object graphs through the public API.

Potential Impact

Applications using vulnerable versions of deepmerge-ts that merge attacker-controlled recursive objects can experience a synchronous crash due to stack exhaustion. In Node.js environments, this can terminate request handling or cause repeated worker process restarts, potentially leading to denial of service conditions.

Mitigation Recommendations

A patch is available for this vulnerability. Users should upgrade deepmerge-ts to version 8.0.0 or later where this issue is fixed. Until patched, avoid merging recursive object graphs or implement custom cycle detection before invoking the merge functions.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
GHSA-ggr8-5vv4-36mx
Osv Schema Version
1.4.0
Aliases
["CVE-2026-40345"]
Ecosystems
["npm"]
Database Specific Severity
HIGH
Cvss Version
4.0

Threat ID: 6a833354bf8831d5392a4dfd

Added to database: 08/17/2026, 16:14:12 UTC

Last enriched: 08/17/2026, 16:27:57 UTC

Last updated: 08/17/2026, 22:06:46 UTC

Views: 5

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses