How I Found a Critical Race Condition on Kruidvat — A Step-by-S
The coupon validation endpoint accepted the same one-time coupon code on many concurrent requests, so the coupon could be applied repeatedly. An attacker could use a single coupon an unlimited number of times, potentially reducing the price to zero.
Published on medium.com
In this article, I’ll walk you through how I discovered a critical race condition on the Kruidvat coupon validation endpoint. This vulnerability allowed an attacker to apply the same promotional coupon unlimited times by sending concurrent requests.
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 server did not synchronise concurrent requests to the coupon validation endpoint, so the one-time-use check was bypassed.
Impact
The same coupon could be applied unlimited times, potentially allowing products to be purchased for free, bypassing the one-time-use restriction.
What the attacker needed
A valid coupon code; ability to send concurrent requests
The fix
The endpoint should be fixed to synchronise concurrent requests and enforce the one-time-use restriction atomically.
How it was found
- Find the coupon validation endpoint on the target subdomain.
- Send a request with a valid coupon code and observe a success response.
- Send many concurrent requests with the same coupon code.
- Observe that all requests return success, confirming the race condition.
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 acts on it, but another request can slip in between the check and the action. Here, the server checked whether a coupon was still valid, but when many requests arrived at once, it approved all of them before marking the coupon as used. This let one coupon be used many times.
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.