Skip to content
Race condition Write-up Advanced

How I Turned a Single Packet Mismatch into a $10,000 Single-Packet Race Condition (H2/HTTP2 Window…

A voucher redemption endpoint checked whether a voucher was already used and then updated the balance without a row lock, leaving a gap between the check and the write. By sending many HTTP/2 streams whose final bytes arrived in one TCP packet, the attacker redeemed one voucher several times and credited extra balance.

T4nv1 Follow

Published on medium.com

In the current bug bounty landscape, automated tools and LLM scanners fail at one specific boundary: sub-millisecond state synchronization across distributed microservices.

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

Likely the read of the voucher's used flag and the later update were not protected by a row lock or serialisable transaction, so concurrent requests could all see the voucher as unused.

Impact

One voucher could be redeemed several times, crediting more balance than it was worth; the text does not say whether any rate limit or WAF slowed the attack.

What the attacker needed

A free account with a valid token; a valid voucher code; ability to send raw HTTP/2 frames

The fix

The check and the update should run inside a row lock or serialisable transaction so only one request can claim a voucher.

How it was found

  1. Find the voucher redemption endpoint and confirm a second sequential request is rejected as already redeemed.
  2. Open one HTTP/2 connection and queue many identical redemption requests behind a synchronisation gate.
  3. Release the gate so the final frames of all streams travel in a single TCP packet.
  4. Observe that several requests returned success and the wallet was credited multiple times.

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.

When you redeem a voucher, the server first checks it is unused and then marks it used. If many requests arrive at almost the same instant, several can pass the check before any of them marks the voucher as used. The author used a trick that makes many requests land in the same tiny moment instead of one after another.

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.