MEDIUM AI PREVALENCE: MEDIUM auth.csharp.flow.open-redirect
A redirect target comes straight from user input (a query-string value or a returnUrl-style parameter) and is passed to Redirect(...) without a local-URL check.
Why AI tools produce this: AI coding tools produce this regularly, typically when prompted for a shortcut or a quick fix.
Why this matters
An attacker can craft a link that bounces the victim to an external phishing site after login, and this is the classic OAuth/OIDC returnUrl open-redirect (CWE-601).
Validate the target before redirecting: use Url.IsLocalUrl(returnUrl) (or LocalRedirect(returnUrl), which throws on a non-local URL) so only same-application paths are allowed.
VULNERABLE
SAFE
Suppressing this rule
If a finding is a genuine false positive, scope the suppression to the exact line and leave a reason, never disable the rule project-wide. Disable directives are line-scoped by design.
// oauthlint-disable-next-line auth.csharp.flow.open-redirect -- <reason>