Winning a Race Against a Wallet: How I Turned a $50 Top-Up Into $
The wallet top-up confirmation endpoint checked payment status and then credited the wallet as separate steps, so concurrent requests could both pass the check and credit the balance. An attacker could multiply a single real payment into many times its value in wallet balance.
Some vulnerability classes get all the attention — SQL injection, XSS, SSRF — while race conditions quietly sit in the background, underreported and underestimated by a huge chunk of the hunting community. That’s a mistake, because race conditions are consistently some of the highest-paying bugs I’ve found, and…
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
The payment status check and the wallet credit were not atomic, so concurrent requests could both pass the check before either marked the payment as processed.
Impact
A single real payment could be multiplied into many times its value in wallet balance, with no rate limit observed.
What the attacker needed
A user account with wallet top-up; ability to make a real payment; tooling for concurrent requests
The fix
The endpoint was fixed by adding an atomic conditional database update and enforcing idempotency keys.
How it was found
- Make a legitimate top-up and capture the confirmation request.
- Replay the request sequentially to confirm a status check exists.
- Use Turbo Intruder with last-byte synchronization to send many requests at once.
- Observe multiple successful credits from a single payment.
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 checks something and then acts on it, but another request can slip in between the check and the action. Here, two requests could both see that a payment was not yet processed and both add money to the wallet. The attacker just sends many requests at the same moment to win that tiny window.
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.