Vulnerability · Published Aug 20, 2026 · Assigned by GitHub_M

CVE-2026-40345deepmerge-ts: Stack exhaustion when merging recursive object graphs

High 8.2

In plain English

A high-severity security flaw in deepmerge-ts from RebeccaStevens. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.5% (higher than 45% of all known vulnerabilities). Ready-made attack tooling exists: public proof-of-concept code. Fixed versions are available - upgrade the affected package.

Severity (CVSS 4.0)8.2High
Exploit odds (30 days)0.5%top 55.4% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack tooling1Public PoC

Official description

deepmerge-ts is a typescript library providing functionality to deep merging of javascript objects. Prior to 8.0.0, the deepmerge, deepmergeCustom, deepmergeInto, and deepmergeIntoCustom APIs do not track visited objects or object pairs when recursively merging records. When two input values contain self-references at the same property path, the merge logic repeatedly revisits the same pair until Node.js raises RangeError: Maximum call stack size exceeded. Applications that merge attacker-controlled recursive object graphs can synchronously crash the affected process or cause repeated worker restarts. Plain JSON input alone cannot create the recursive graph required to trigger the issue. This issue is fixed in version 8.0.0.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
npmdeepmerge-ts8.0.0GHSA-ggr8-5vv4-36mx

Affected products (as reported)

VendorProductVersions
RebeccaStevens deepmerge-ts < 8.0.0

Weakness: CWE-674 · Vector: 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

References