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.
Published: 2026-08-20
Score: 8.2 High
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

deepmerge-ts provides deep merging of JavaScript objects. The library lacks cycle detection before version 8.0, so recursive self‑referencing objects at the same property path cause the algorithm to repeatedly merge the same pair of objects, leading to a stack overflow and a RangeError. When an attacker supplies such a structure, the application that calls deepmerge will synchronously crash or trigger worker restarts, resulting in denial of service. The weakness is classified as CWE‑674, Uncontrolled Recursion.

Affected Systems

The vulnerability affects any Node.js application that imports the deepmerge-ts library prior to version 8.0.0. This includes all releases ranging from the initial commit through the 7.x series. Users of the library via npm or other package managers should verify the installed version and ensure they are not using an old release.

Risk and Exploitability

The CVSS base score is 8.2, indicating high severity, while the EPSS score is unavailable but the lack of a KEV listing suggests it has not yet been widely exploited. The attack requires the application to receive and merge a crafted object graph controlled by an adversary. If the library is invoked in a publicly exposed endpoint, the attack can be launched remotely; otherwise it would be limited to the local environment. Exploitation does not provide code execution or privilege escalation, but it can disrupt service availability and destabilize Node.js worker processes.

Generated by OpenCVE AI on August 20, 2026 at 20:03 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade the deepmerge-ts package to version 8.0.0 or later, which implements cycle detection and prevents stack exhaustion.
  • Validate or sanitize input objects before passing them to deepmerge, ensuring that no self‑referencing structures can be constructed.
  • If deep merging is not a critical feature, remove the dependency or disable the merge operations until a patched version is available.

Generated by OpenCVE AI on August 20, 2026 at 20:03 UTC.

Tracking

Sign in to view the affected projects.

Advisories
Source ID Title
Github GHSA Github GHSA GHSA-ggr8-5vv4-36mx DeepmergeTS has stack exhaustion when merging recursive object graphs
History

Fri, 21 Aug 2026 12:30:00 +0000

Type Values Removed Values Added
First Time appeared Rebeccastevens
Rebeccastevens deepmerge-ts
Vendors & Products Rebeccastevens
Rebeccastevens deepmerge-ts

Thu, 20 Aug 2026 17:00:00 +0000

Type Values Removed Values Added
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.
Title deepmerge-ts: Stack exhaustion when merging recursive object graphs
Weaknesses CWE-674
References
Metrics cvssV4_0

{'score': 8.2, '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'}


Subscriptions

Rebeccastevens Deepmerge-ts
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-08-20T16:33:52.702Z

Reserved: 2026-04-10T22:50:01.358Z

Link: CVE-2026-40345

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-08-20T17:17:29.783

Modified: 2026-08-20T17:17:29.783

Link: CVE-2026-40345

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-21T12:08:46Z

Weaknesses