Exploit database

Vulnerability

CVE-2026-40345

deepmerge-ts: Stack exhaustion when merging recursive object graphs

Vulnerability details

Score
8.2
Severity
high

CVSS 4.0 · GitHub_M

Vector string

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

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.

CVE Program

Exploit source choices

1 source
jvr2022/cve-2026-40345
GH-9a15c927d1634a2ada1e945e3ec9e01dGitHubUnofficial GitHub sourcePreferred

A poc and write-up for CVE-2026-40345

2026-08-177 files · 6 stars