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.
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
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| npm | deepmerge-ts | 8.0.0 | GHSA-ggr8-5vv4-36mx |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| 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
- https://github.com/RebeccaStevens/deepmerge-ts/security/advisories/GHSA-ggr8-5vv4-36mx x_refsource_CONFIRM
- https://github.com/RebeccaStevens/deepmerge-ts/pull/707 x_refsource_MISC
- https://github.com/RebeccaStevens/deepmerge-ts/commit/398492757b3f22a0d7d89b09ce1ae9cd32806c9a x_refsource_MISC
- https://github.com/RebeccaStevens/deepmerge-ts/releases/tag/v8.0.0 x_refsource_MISC