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

Referer header leakage

10

External resources or links on OAuth pages can disclose sensitive URL contents through the Referer header.

Related RFCs and changes

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

DIAGRAM§ 4.2 ↗
RFC 9700 · § 4.2DEFENSE
3 / 3
Referer header leakageExternal resources or links on OAuth pages can disclose sensitive URL contents through the Referer header. Current state: Consume codes and state only once..Referer header leakage○ ○ ○client.example/cb?code=ABCcallback pageThird partyno Referer headersingle-use code consumedclean callback URL
03
Consume codes and state only once.

Replay checks reduce reuse after the legitimate transaction completes.

Protocol participantThreat or exceptionProtocol controlSimplified drawings · precise section references
KEY POINT

Keep OAuth pages free of leakage paths.

  • Authorization and callback pages SHOULD NOT include third-party resources or external links.
  • An appropriate Referrer-Policy, such as no-referrer, suppresses referrer disclosure.
  • Bind codes with PKCE or confidential-client credentials; invalidate codes after use and SHOULD invalidate state after its first use. Form post is another option.
DETAILS

The authorization page can leak state before it is consumed. A callback can leak codes. Single-use codes help after redemption, but a thief can race the legitimate client; duplicate redemption SHOULD trigger revocation of previously issued tokens.

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 ↗