CVE-2024-53858: Loop First Item Size Limit Bypass

A size or resource limit check inside a loop is bypassed for the first iteration using a condition like `&& count > 0` or `&& fetched > 0`. An attacker can exploit this by ensuring the first processed item is exceptionally large, completely bypassing the intended maximum size constraint and causing uncontrolled resource consumption (DoS). Remove the counter

Provally CuratedPublic repositoryMediumMedium confidenceVerifiedApache-2.0Goβ
greprules fetch cve-2024-53858-loop-first-item-size-limit-bypass --engine opengrep

Description

A size or resource limit check inside a loop is bypassed for the first iteration using a condition like `&& count > 0` or `&& fetched > 0`. An attacker can exploit this by ensuring the first processed item is exceptionally large, completely bypassing the intended maximum size constraint and causing uncontrolled resource consumption (DoS). Remove the counter