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

Access token injection

14

A thief can substitute a stolen access token into an implicit response while retaining the client’s valid state.

Related RFCs and changes

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

DIAGRAM§ 4.6 ↗
RFC 9700 · § 4.6DEFENSE
3 / 3
Access token injectionA thief can substitute a stolen access token into an implicit response while retaining the client’s valid state. Current state: Use the resulting token within its bounds..Access token injectionClient○ ○ ○authorizationcode responsecode + verifier exchangedValidate the token from the protected exchange
03
Use the resulting token within its bounds.

Sender constraints and audience checks provide further protection.

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

Do not accept an unbound front-channel token.

  • Pure OAuth implicit flows cannot detect this token substitution through state alone.
  • Prefer code flow, as recommended in § 2.1.2.
  • OIDC can mitigate injection by validating the ID Token, its at_hash, and nonce. Sender constraints are still needed against direct replay at an API.
DETAILS

State links a response to a browser session. It does not cryptographically bind an access token to that response. An attacker can preserve state while changing the token.

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 ↗