CVE-2026-25221: Oauth Missing State Parameter Validation

The OAuth callback fails to validate the `state` parameter. It retrieves the `code` parameter but does not fetch or check a `state` parameter. This missing verification allows an attacker to conduct a Login Cross-Site Request Forgery (CSRF) attack by supplying their own authorization code. Always fetch and validate `state`.

Provally CuratedPublic repositoryHighMedium confidenceVerifiedApache-2.0JS
greprules fetch cve-2026-25221-oauth-missing-state-parameter-validation --engine opengrep

Description

The OAuth callback fails to validate the `state` parameter. It retrieves the `code` parameter but does not fetch or check a `state` parameter. This missing verification allows an attacker to conduct a Login Cross-Site Request Forgery (CSRF) attack by supplying their own authorization code. Always fetch and validate `state`.