Skip to content
Race condition Write-up Intermediate

How i was able to get 29 free products. | Bug Bounty

The monthly free sample add-to-basket request could be sent many times simultaneously, and each request succeeded, allowing the attacker to obtain 29 free products instead of one. The attacker exploited a race condition in the basket endpoint.

Fırat Follow

Published on infosecwriteups.com

Race condition occurs when two or more threads can access shared data and they try to change it at the same time. If you have a hard time understanding theoretical stuff, let me give you an example.

Fırat, on infosecwriteups.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

What the attacker needed

A monthly subscription; ability to capture and replay requests

How it was found

  1. Capture the request to add the free sample to the basket.
  2. Send the request to Turbo Intruder.
  3. Run the request many times simultaneously.
  4. Observe that all responses are 200 and the free sample was added 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.

A race condition happens when a website checks something (like 'has this user already claimed their free sample?') and then updates the record, but two requests arrive so close together that both pass the check before either update is saved. Here, sending many requests at the same moment let the attacker add the free sample to the basket many times, getting more than the allowed one.

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 Fırat

View all

4 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.