Skip to content

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

HighCVSS 8.2 EPSS 0.52%
Published
Updated
Exploit status
No public exploit known
CISA SSVC
Proof of concept public · automatable: no · technical impact: partial

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.

Upgrade path

2 packages: 1 fixed.

PackageAffectedFixed inStatus
npm deepmerge-ts(npm) < 8.0.0 8.0.0 Fixed
RebeccaStevens deepmerge-ts = < 8.0.0 No fix listed Versions listed

Affected products

ProductAffected versionsFixed in
RebeccaStevens deepmerge-ts = < 8.0.0 No fix listed
npm deepmerge-ts(npm) < 8.0.0 8.0.0

References