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.

RFC 9700 · § 4.1DEFENSE
3 / 3
03
A separate valid request reaches its callback.

This new example uses the exact registered URI; the rejected request above ended without a redirect. PKCE adds another layer against misuse of a leaked code.

Redirect URI validationA permissive redirect pattern can send a code or token straight to an attacker-controlled address. Current state: A separate valid request reaches its callback..Redirect URI validationregistered: https://client.example/cbpolicy: exact string comparisonSeparate valid requesthttps://client.example/cbexact matchRegistered callbackCode sent only for this separate valid request

Key idea: Match registered redirect URIs exactly.

Terms

Look up a term in the glossary ↗

Rules & examples
  • 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.

Sources
Protocol participantThreat or exceptionProtocol controlSimplified drawings · precise section references
New to this? Start hereA quick picture + helpful background

A key is different from permission.

An app, a person, and a server have different roles. Follow who asks, who grants permission, and who checks the credential. A key in the drawing is an analogy, not a literal protocol field.

Helpful first, if these ideas are unfamiliar

These pictures are analogies to help you learn. The linked RFC explains the actual rules.

Related RFCs and changes

“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.

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 ↗

All chapters in RFC 9700

Drawing view

Scroll the drawing to see every part. Playback controls stay above it.

RFC 9700 / CHAPTERS

Chapters

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

RFC status and corrections ↗