CVE-2026-55185: Unbounded Html Tokenization No Early Exit

The function tokenizes an HTML string and writes all resulting text tokens to a buffer in a loop that only exits on EOF or error. Without an early-exit mechanism (such as short-circuiting via an iterator or length check), excessively large HTML payloads can lead to Denial of Service (DoS) due to CPU and memory exhaustion. Consider replacing rigid loops with

Provally CuratedPublic repositoryMediumMedium confidenceVerifiedApache-2.0Go
greprules fetch cve-2026-55185-unbounded-html-tokenization-no-early-exit --engine opengrep

Description

The function tokenizes an HTML string and writes all resulting text tokens to a buffer in a loop that only exits on EOF or error. Without an early-exit mechanism (such as short-circuiting via an iterator or length check), excessively large HTML payloads can lead to Denial of Service (DoS) due to CPU and memory exhaustion. Consider replacing rigid loops with