Skip to content
Race condition Write-up Intermediate

Race Condition: Claiming the Same Sunbed More Than Once

The reward-claim endpoint did not synchronise concurrent requests, so several identical claim requests sent at the same moment were all processed before the reward status was updated. An attacker could therefore claim the same welcome reward more than once.

medium.com

Published on medium.com

Link : TryHackMe | Towel on the Sunbed

Isv0x1, 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 claim operation was not atomic: the check for an existing claim and the update marking it claimed were separate steps, with no locking around them.

Impact

The application could grant the same reward multiple times, breaking the intended one-claim business rule.

What the attacker needed

A free account; ability to intercept and replay requests; client-side button restriction bypassed

The fix

The claim should be made atomic on the server, for example with a database transaction or a lock, so only one concurrent request can succeed.

How it was found

  1. Create an account and log in to the application.
  2. In the browser developer tools, override the frontend value that disables the Claim Reward button, then refresh so the button is available again.
  3. Intercept the Claim Reward request in Burp Suite and send it to a new request group.
  4. Duplicate the request several times inside the group.
  5. Use Send Group in Parallel so all copies reach the server at nearly the same moment.
  6. Turn off interception and the browser proxy, then refresh the page to see the multiple claims.

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 changes it, but two requests can slip in between those two moments. Here the server checked whether the reward was already claimed and then marked it claimed, but many copies of the request arrived together, so each one saw it as unclaimed. The attacker gets the reward several times instead of once.

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.

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.