flat: Denial of service via unflatten() with numeric array index keys
The JavaScript npm library flat through version 6.0.1 allows attackers to create huge sparse arrays through unbounded numeric keys in unflatten(). Attackers can supply flattened keys such as a.4294967294, which causes iteration with forEach, spread or JSON.stringify to block the Node.js event loop. The attack is only relevant if an application passes attacker-controlled keys into unflatten(), and the impact is limited to availability.
hughsk · flat
