CVE-2024-5138: Blind Args Help Check

A boolean function checks for help flags ("--help" or "-h") using a generic list Contains method. This pattern causes parser desynchronization (also known as argument injection or bypasses) when placed alongside a strict argument parser. An attacker can append `-- --help` so the manual check returns true, but the underlying CLI ignores `--help` as a flag and

Provally CuratedPublic repositoryMediumMedium confidenceVerifiedApache-2.0Go
greprules fetch cve-2024-5138-blind-args-help-check --engine opengrep

Description

A boolean function checks for help flags ("--help" or "-h") using a generic list Contains method. This pattern causes parser desynchronization (also known as argument injection or bypasses) when placed alongside a strict argument parser. An attacker can append `-- --help` so the manual check returns true, but the underlying CLI ignores `--help` as a flag and