RebeccaStevens deepmerge-ts
deepmerge-ts: Stack exhaustion when merging recursive object graphs
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 versions and mitigation
From the CVE record and the vendor's references.Affected
- < 8.0.0
Fixed in 8.0.0
Mitigation
Upgrade deepmerge-ts to 8.0.0 or later.
References
- Vendor advisory github.com/RebeccaStevens/deepmerge-ts/securit…
- Patch github.com/RebeccaStevens/deepmerge-ts/pull/70…
- Patch github.com/RebeccaStevens/deepmerge-ts/commit/…
1 more
- Release notes github.com/RebeccaStevens/deepmerge-ts/release…
Timeline
Days relative to CVE publicationFirst public PoC 3.1 days before publication; not in CISA KEV. First PoC: Jvr2022/CVE-2026-40345 (created 17 Aug 2026, found by us: backfilled).
PoC repositories
Found on GitHub.1 PoCs
PoCs 1
| Repository | Created | Stars | Assessment |
|---|---|---|---|
| Jvr2022/CVE-2026-40345 | 17 Aug 2026 −3.1 d | 6 | PoC |
Only PoCs count toward the first-PoC date and the characteristics below. Do not run PoC code from unknown sources.