Redirect URI validation
09A permissive redirect pattern can send a code or token straight to an attacker-controlled address.
Related RFCs and changes
“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.
PKCE adds another layer against misuse of a leaked code.
The framework allowed partial URI registration in some cases. The BCP requires exact string matching, with the native loopback-port exception and the authenticated-request exception described in § 4.1.3.
Read the updated RFC section ↗Match registered redirect URIs exactly.
- Servers MUST use exact string matching; native localhost redirect ports are the exception.
- Callback hosts MUST NOT expose open redirectors. Prefer code over front-channel access tokens.
- § 4.1.3 permits trusting the URI when request origin and integrity are verified, for example authenticated JAR or PAR.
Wildcards can fail even when their parser is correct: an attacker may take over a permitted subdomain. A fragment such as #_ on onward redirects can prevent browser fragment reattachment; it does not replace redirect validation.
Read the RFC section ↗Diagrams simplify the RFC. Read the linked sections for complete requirements.
PrivacyAll chapters in this RFC
- OAuth overview
- Authorization code + PKCE
- Retire unsafe grants
- Prevent token replay
- Limit token privileges
- Authenticate the client
- Metadata, TLS & CORS
- The attacker model
- Redirect URI validation
- Referer header leakage
- Browser history leakage
- Authorization server mix-up
- Authorization code injection
- Access token injection
- Cross-site request forgery
- PKCE downgrade
- Leakage at resource servers
- Misuse of stolen tokens
- Open redirection
- 307 credential forwarding
- TLS termination & proxies
- Refresh token protection
- Client as resource owner
- Clickjacking
- In-browser messaging