How a Race Condition in a Loyalty Wallet Scored a $15,000 Critica
A loyalty wallet's voucher redemption lacked row-level locking, so sending many simultaneous requests for the same voucher let several threads pass the validity check before the voucher was marked spent. The attacker could credit the same voucher multiple times, turning a $50 voucher into a $300 balance.
We’ve all seen standard web vulnerabilities like cross-site scripting (XSS) or SQL injection. But some of the most lucrative bugs don’t involve breaking code structure at all.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the voucher redemption logic performed a check-then-act sequence without database-level locking or atomic operations, allowing concurrent requests to read the voucher as unused before any of them marked it spent.
Impact
The attacker could duplicate the voucher's value multiple times, gaining extra balance; the text shows six successful redemptions from one $50 voucher, resulting in a $300 balance.
What the attacker needed
A valid voucher code; a user account on the loyalty platform; ability to send concurrent HTTP/2 requests
The fix
The vulnerability was fixed by applying strict database transactions with pessimistic locking, so a row is locked when read and concurrent requests wait.
How it was found
- Buy a legitimate voucher and capture the redemption request in Burp Suite.
- Send the request to Turbo Intruder and configure 50 identical requests using the same voucher code.
- Use HTTP/2 single-packet attack to send all requests simultaneously.
- Observe multiple successful responses and the increased account balance.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
A race condition happens when a program does a check and then an action, and someone sends many requests at the same moment so several of them pass the check before the first one finishes. Here, the check was 'is this voucher unused?' and the action was 'add money and mark it used'. By sending 50 requests at once, six of them all saw the voucher as unused and each added $50.
What is Race condition?
Parallel requests reach a state the code assumed could not happen: a coupon used twice, a limit overrun, a check skipped.