CVE-2026-34043: Improper Sparse Array Check Dos

Checking for array sparsity using `.filter()` with an unconditionally true callback can lead to a Denial of Service (DoS) via CPU exhaustion if the input object inherits from `Array.prototype` and has a maliciously large `length` property. The `.filter()` method linearly iterates up to `length`. Use `Array.isArray()` to strictly validate arrays and `Object.k

Provally CuratedPublic repositoryHighMedium confidenceVerifiedApache-2.0JS
greprules fetch cve-2026-34043-improper-sparse-array-check-dos --engine opengrep

Description

Checking for array sparsity using `.filter()` with an unconditionally true callback can lead to a Denial of Service (DoS) via CPU exhaustion if the input object inherits from `Array.prototype` and has a maliciously large `length` property. The `.filter()` method linearly iterates up to `length`. Use `Array.isArray()` to strictly validate arrays and `Object.k