Skip to content
Race condition Write-up Intermediate

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.

Lelouchzero Follow

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.

Lelouchzero, 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 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

  1. Find the coupon validation endpoint on the target subdomain.
  2. Send a request with a valid coupon code and observe a success response.
  3. Send many concurrent requests with the same coupon code.
  4. 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.

More by Lelouchzero

View all

1 more disclosed report, 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.