Cloudanix VulnDB

CVE-2026-40345

None

CVSS

—

EPSS

0.5%

Published

Aug 20, 2026

CISA due date

—

Cloudanix analysis

Monitor only SSVC: Track

A data-combining helper used inside some applications can be tricked into crashing the whole program when given specially crafted looping data structures.

Exploitation
Remote Unauthenticated
Attacker needs
None
Complexity
Low
Impact
Denial Of Service
Component
Library
Class
Denial of service
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

The deepmerge, deepmergeCustom, deepmergeInto, and deepmergeIntoCustom functions lack visited-object tracking, allowing unbounded recursion when self-referential object graphs are supplied at matching property paths and resulting in synchronous RangeError: Maximum call stack size exceeded.

Why it matters to the business

Applications performing deep merges on untrusted object structures can experience abrupt process crashes or repeated worker restarts, producing denial-of-service conditions without persistent data loss.

How an attack unfolds

An attacker constructs a pair of objects containing cyclic references at identical paths, passes them to any of the affected merge APIs, and triggers immediate stack exhaustion inside the Node.js event loop.

How to fix it

Upgrade deepmerge-ts to version 8.0.0 or later; after upgrade, re-test all merge call sites with representative recursive inputs to confirm the stack-limit guard is active.

How to confirm the fix worked

Inventory package.json or lockfiles for deepmerge-ts versions prior to 8.0.0; run a unit test that supplies a pair of mutually recursive objects to each merge function and verify that a controlled error or safe return occurs instead of a stack overflow.

Typical attack path

  1. Locate application endpoints or code paths that invoke deepmerge-ts merge functions on external input
  2. Craft two JavaScript objects that reference each other at the same property depth
  3. Submit the objects through the merge entry point
  4. Observe synchronous RangeError crash or worker restart

How to detect it

Search Node.js application and worker logs for "RangeError: Maximum call stack size exceeded" entries that coincide with calls to deepmerge, deepmergeCustom, deepmergeInto, or deepmergeIntoCustom; correlate with request timestamps that accept complex object payloads.

  • RangeError: Maximum call stack size exceeded
  • deepmerge-ts merge functions in stack trace

What your security team should do

  • Immediately update deepmerge-ts to 8.0.0+ in all services and rebuild containers
  • Add input-schema validation or depth limits around any merge of untrusted data
  • Monitor application logs for RangeError stack traces originating from merge functions
  • Review downstream dependents that consume the library to ensure transitive upgrades occur

The record

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

Ecosystem Package Introduced Fixed

Related vulnerabilities