Skip to content
Race condition Write-up Beginner

Race Condition on Likes of Product Leads to Products can appear more popular

The product favourite counter could be inflated by replaying the same add-to-favourites request many times in parallel, because the platform handled concurrent updates without proper synchronisation. An attacker could make a product appear far more popular than it really was and skew the platform's analytics.

omdubey170 Follow

Published on medium.com

In my recent bug bounty activities, I stumbled upon a significant race condition vulnerability in a popular e-commerce platform. This vulnerability, when exploited, can seriously impact the integrity of product favorite counts and user trust.

Omdubey, 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 favourite-count update was not atomic, so concurrent identical requests each read and wrote the counter without locking, letting one user's action be counted many times.

Impact

Products could appear more popular than they are, misleading buyers and skewing analytics, and the author claims continuous manipulation could cause performance problems, though no denial-of-service was demonstrated.

What the attacker needed

A free account; ability to send many parallel requests

How it was found

  1. Create an account and open a product page that shows zero favourites.
  2. Click the heart icon to add the product to favourites and confirm the count rises.
  3. Capture the add-to-favourites request in an intercepting proxy and send it to the repeater.
  4. Copy the request as a command-line request and build a script that repeats it many times.
  5. Run the script so the many requests hit the server at once and the favourites count jumps.
  6. Keep the script running from a server to keep pushing the count up while the cached value is shown.

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 favourite counter is meant to go up once per person who clicks the heart. Here the server did not check properly when many identical clicks arrived at almost the same moment, so the same single click could be counted over and over. The result is a fake popularity score that other shoppers see.

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 omdubey170

View all

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