CVE-2026-33997: Slice Equality Off By One

A loop variable is initialized to 1 instead of 0 during a slice comparison. This skips the first element of the slice (index 0). If this function is used for security validation (e.g., evaluating privileges or rules), it could lead to policy bypasses. Ensure index 0 is validated, or initialize the loop variable to 0.

Provally CuratedPublic repositoryMediumMedium confidenceVerifiedApache-2.0Go
greprules fetch cve-2026-33997-slice-equality-off-by-one --engine opengrep

Description

A loop variable is initialized to 1 instead of 0 during a slice comparison. This skips the first element of the slice (index 0). If this function is used for security validation (e.g., evaluating privileges or rules), it could lead to policy bypasses. Ensure index 0 is validated, or initialize the loop variable to 0.