Technical impact
flat, a Node.js utility for flattening and unflattening objects, contains an uncontrolled resource allocation flaw in its unflatten() function. The vulnerability allows an attacker to supply flattened keys with large numeric indices, such as a.4294967294, that create extremely sparse arrays. Operations that iterate over these arrays, including forEach, spread operators, or JSON.stringify, consume disproportionate CPU and memory, blocking the Node.js event loop and rendering the application unresponsive.
Affected Systems
The flaw affects versions of the flat library up to and including 6.0.1. Any Node.js application that imports or requires flat, directly or indirectly, and processes untrusted input through unflatten() is at risk. The affected product is the hughsk:flat library. Version 6.0.1 and earlier are impacted.
Risk and Exploitability
The CVSS score of 8.2 indicates high severity, and the absence of an EPSS score suggests no publicly observed exploitation data yet, but the attack vector is clear: supplying crafted input to unflatten() can create the sparse array and trigger the denial of service. The vulnerability is not listed in the CISA KEV catalog, but the limited resource consumption could be leveraged in a targeted denial‑of‑service attack. An attacker does not need additional privileges and merely has to provide malicious keys to the affected library function within the application context.