Case BD0F97 · Web AppSec · L3 Applied

One Coupon, 41 Redemptions

Practise as: Incident drillLevel: L3 Applied

Live alertFinance flags single-use promo WELCOME50 redeemed 41 times by account 88213 at 14:02 UTC. checkout-api logs show 41 POST /cart/apply-coupon requests landing within 30 ms on one HTTP/2 connection.

  1. 01 What happened?
  2. 02 What is the impact?
  3. 03 What do you do?
What a strong answer covers

Try it out loud first. Then check yourself:

  1. Race condition (limit overrun): check-then-update is not atomic, so parallel requests all pass the unused check
  2. HTTP/2 single-packet attacks make requests arrive together, so a tiny race window is reliably exploitable
  3. Impact: direct financial loss; hunt logs for the same pattern on gift cards, refunds, transfers and other one-time actions
  4. Contain: disable the code, void fraudulent orders, suspend linked accounts; preserve logs and order records
  5. Fix: atomic conditional update or unique constraint, row locks (SELECT FOR UPDATE), and idempotency keys

If the interviewer pushes back

  • Why does rate limiting per user not fix this class of bug?
  • Where else in a typical app would you look for the same check-then-act pattern?

Go deeper

More Web AppSec cards

All Web AppSec cards →

cardosec draws a security topic and gives you a clock: explain it out loud with no notes, then see what you covered and what you missed. Free during early access.

Reviewed 2026-10-09