Visual RFC.
ALL RFCs / RFC 9700
Read the RFC ↗
RFC 9700 / ATTACKS & DEFENSES

Redirect URI validation

09

A 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.

DIAGRAM§ 4.1 ↗
RFC 9700 · § 4.1DEFENSE
3 / 3
Redirect URI validationA permissive redirect pattern can send a code or token straight to an attacker-controlled address. Current state: Send only to the validated callback..Redirect URI validationregistered: client.example/cbcomplete URI must matchclient.example.evil/cbcompare / routelookalike rejectedValidated callback
03
Send only to the validated callback.

PKCE adds another layer against misuse of a leaked code.

Protocol participantThreat or exceptionProtocol controlSimplified drawings · precise section references
WHAT CHANGED
RFC 6749 § 3.1.2.3RFC 9700 § 4.1.3

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 ↗
KEY POINT

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.
DETAILS

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.

Privacy
All chapters in this RFC
  1. OAuth overview
  2. Authorization code + PKCE
  3. Retire unsafe grants
  4. Prevent token replay
  5. Limit token privileges
  6. Authenticate the client
  7. Metadata, TLS & CORS
  8. The attacker model
  9. Redirect URI validation
  10. Referer header leakage
  11. Browser history leakage
  12. Authorization server mix-up
  13. Authorization code injection
  14. Access token injection
  15. Cross-site request forgery
  16. PKCE downgrade
  17. Leakage at resource servers
  18. Misuse of stolen tokens
  19. Open redirection
  20. 307 credential forwarding
  21. TLS termination & proxies
  22. Refresh token protection
  23. Client as resource owner
  24. Clickjacking
  25. In-browser messaging
RFC 9700 / CHAPTERS

Chapters

For full details, tables, algorithms, and exceptions, read the original RFC.

RFC status and corrections ↗