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.

RFC 9700 · § 4.6DEFENSE
3 / 3
03
Use the resulting token within its bounds.

Sender constraints and audience checks provide further protection.

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 injectionAppResource APIaccess token TToken T → intended user’s resourcesEnforce its audience and sender policy at the API

Key idea: Do not accept an unbound front-channel token.

Terms

Look up a term in the glossary ↗

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

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.

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.

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 ↗