I Hacked a Multi-Million Dollar E-Commerce Site by Exploiting a 0.001-Second Race Condition
A race condition in a coupon redemption feature allowed the same discount code to be applied multiple times within a very short window. An attacker could exploit this to reduce the price of items to zero, potentially obtaining products for free.
My room was dead silent, pitch black, and the only light came from the harsh blue glare of my monitor.
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
Impact
An attacker could obtain products for free or at a drastically reduced price, and could automate the attack to drain inventory.
What the attacker needed
A valid coupon code; ability to send concurrent requests
The fix
The company patched the vulnerability immediately.
How it was found
- Identify the coupon code input feature and understand the server's check-apply-update logic.
- Use a tool like Turbo Intruder to send many identical coupon application requests simultaneously.
- Observe that multiple requests succeed, each applying the discount.
- Refresh the checkout page to see the cumulative discount reducing the total to zero.
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 system checks something and then updates it, but another request can sneak in between those two steps. Here, the server checked if a coupon was unused, applied the discount, and only then marked it as used. By sending many requests at the same instant, the attacker got multiple discounts before the coupon was marked used.
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.