CVE-2026-42504: Go Mime Short Cursor Advance Dos

The parser cursor is advanced by only a small offset (`start+2`) rather than the entire parsed token length (`end`) when an error occurs. This causes overlapping reparsing of the input string, leading to O(N^2) complexity and potential Denial of Service (DoS).

Provally CuratedPublic repositoryMediumMedium confidenceVerifiedApache-2.0Go
greprules fetch cve-2026-42504-go-mime-short-cursor-advance-dos --engine opengrep

Description

The parser cursor is advanced by only a small offset (`start+2`) rather than the entire parsed token length (`end`) when an error occurs. This causes overlapping reparsing of the input string, leading to O(N^2) complexity and potential Denial of Service (DoS).