deepmerge-ts: Stack exhaustion when merging recursive object graphs
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Attack requirements
- Present
- Impact type
- Denial of service
- Confidentiality · integrity · availability
- None · None · High
- Fix status
- Fixed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA and GitHub. Impact type from CWE-674.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| RebeccaStevens | deepmerge-ts | before 8.0.0 | 8.0.0 | Patch available | CNA |
| — | deepmerge-ts (npm) | before 8.0.0 | 8.0.0 | Patch available | GHSA-ggr8-5vv4-36mx |
- deepmerge-ts VendorRebeccaStevens Affected before 8.0.0 Fixed in 8.0.0 Patch available CNA
- deepmerge-ts (npm) Vendor— Affected before 8.0.0 Fixed in 8.0.0 Patch available GHSA-ggr8-5vv4-36mx
Remediation
- Fix · CNA deepmerge-ts (RebeccaStevens) Fixed in 8.0.0
- Fix · GHSA-ggr8-5vv4-36mx deepmerge-ts (npm) Fixed in 8.0.0 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2026-40345
- 2026-10-03 Alias added: GHSA-ggr8-5vv4-36mx
References
Other 5
- https://github.com/RebeccaStevens/deepmerge-ts/security/advisories/GHSA-ggr8-5vv4-36mx
- https://github.com/RebeccaStevens/deepmerge-ts/pull/707
- https://github.com/RebeccaStevens/deepmerge-ts/commit/398492757b3f22a0d7d89b09ce1ae9cd32806c9a
- https://github.com/RebeccaStevens/deepmerge-ts/releases/tag/v8.0.0
- https://github.com/RebeccaStevens/deepmerge-ts
Sources
- CVE-2026-40345 · CVE Program
- CVE-2026-40345 · NVD
- FIRST EPSS
- GHSA-ggr8-5vv4-36mx · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences