Workflow Reversal and Replay Attacks
What you'll learn: How attackers manipulate workflows by reversing completed steps or replaying old requests to bypass business logic controls.
The Core Idea
In many multi-step processes (checkout flows, approval chains, booking systems), the application expects users to move forward through defined states. Workflow reversal occurs when an attacker moves backwards through steps that should be finalized, while replay attacks involve resubmitting old valid requests to repeat actions that should only happen once.
Think of it like a movie ticket system: after you've redeemed your ticket and entered the theater, the attacker tries to "un-redeem" it to sell again (reversal), or they screenshot the QR code and scan it multiple times for free entries (replay).
Common Attack Scenarios
Reversal Attacks:
- Completing a purchase, then reversing back to the "select payment method" step to change the price
- Confirming a withdrawal, then jumping back to increase the amount before final processing
- Completing account closure, then re-accessing admin functions that weren't properly invalidated
Replay Attacks:
- Capturing a "transfer $100" request and sending it 10 times
- Reusing a discount code application request after it's been consumed
- Replaying a password reset token that wasn't properly invalidated
- Resubmitting a refund approval that should only process once
Why They Work
These attacks succeed when applications fail to:
- Validate that prerequisite states still hold before processing
- Invalidate tokens, nonces, or transaction IDs after first use
- Check for duplicate submissions or idempotency violations
- Lock down completed workflow stages
Key Takeaway: Always validate current workflow state before processing any action, use single-use tokens, and ensure completed steps cannot be undone or replayed without proper authorization and state verification.