CVE-2026-45056: Rust Insecure Oidc State String

OIDC or OAuth2 state or CSRF tokens are defined as plain `String`. Standard string equality operations (`==`, `!=`, and hash map lookups) exit early upon discovering a mismatched byte. This can introduce timing side-channels, allowing attackers to infer the valid token byte-by-byte. For security-sensitive secrets, use a wrapper type that enforces constant-ti

Provally CuratedPublic repositoryHighMedium confidenceVerifiedApache-2.0Rust
greprules fetch cve-2026-45056-rust-insecure-oidc-state-string --engine opengrep

Description

OIDC or OAuth2 state or CSRF tokens are defined as plain `String`. Standard string equality operations (`==`, `!=`, and hash map lookups) exit early upon discovering a mismatched byte. This can introduce timing side-channels, allowing attackers to infer the valid token byte-by-byte. For security-sensitive secrets, use a wrapper type that enforces constant-ti