replay attack
An attack where a captured valid message, such as a token or code, is sent again to repeat its effect.
A replayed token or code can repeat a login or grant access to an attacker.
In more detail
Single-use values and short expiry times defeat replays. The word replay also has harmless meanings, such as resending missed events or cached build outputs.
Example
OAuth codes and state values are deleted once used; a reused refresh token triggers revocation.Related terms
- state parameter — A random value the client sends at the start of an OAuth flow and checks when the browser returns, binding the response to its own request.
- refresh token — A longer-lived credential a client uses to get a new short-lived access token without asking the user to log in again.
- idempotency — The property of an operation that gives the same result whether you run it once or many times, because a repeat run finds nothing left to do.
- bearer token — A token that grants access to whoever presents it, sent as Authorization: Bearer <token>, without any further proof of identity.
- audience — The recipient a token is meant for, named in its aud claim, such as one particular API.
Taught in
- OAuth2 & OpenID Connect: Social Auth & PKCE Flows — Production Full-Stack Engineering
- JWT Verification: Asymmetric Keys & Refresh Rotation — Production Full-Stack Engineering
- Workload Identity — Application Security & Threat Modeling for Engineers