CVE-2026-24871: Insecure Whitelist Bypass Contains

Using substring matching (`contains`, `containsAnyIgnoreCase`) for whitelist validation is insecure. An attacker can craft a payload that includes the whitelisted string as a substring (e.g., inside method arguments or spoofed package names) to bypass validation. Use strict exact matching (`.equals()`) or boundary prefixes (`.startsWith(prefix + \".\")`) ins

Provally CuratedPublic repositoryHighMedium confidenceVerifiedApache-2.0Java
greprules fetch cve-2026-24871-insecure-whitelist-bypass-contains --engine opengrep

Description

Using substring matching (`contains`, `containsAnyIgnoreCase`) for whitelist validation is insecure. An attacker can craft a payload that includes the whitelisted string as a substring (e.g., inside method arguments or spoofed package names) to bypass validation. Use strict exact matching (`.equals()`) or boundary prefixes (`.startsWith(prefix + \".\")`) ins