Skip to content
Race condition Write-up Intermediate

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.

T4nv1 Follow

Published on medium.com

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…

T4nv1, on medium.com

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

  1. Make a legitimate top-up and capture the confirmation request.
  2. Replay the request sequentially to confirm a status check exists.
  3. Use Turbo Intruder with last-byte synchronization to send many requests at once.
  4. 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.

More by T4nv1

View all

113 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Race conditions

The lesson behind this report.

Parallel requests reach a state the code assumed could not happen: a coupon used twice, a limit overrun, a check skipped.