I Found A Race Condition Vulnerability Which allow an attacker can do unlimited like & dislike on Products Review
The addLike mutation did not properly check for an existing like before creating a new one, so sending many like requests at the same moment created several like records for one user and one review. An authenticated attacker could therefore inflate or deflate a review's like and dislike counts without limit.
Published on mdnawshadahmmed.medium.com
A race condition vulnerability exists in the addLike mutation that allows authenticated users to like the same Review multiple times, bypassing the intended one-like-per-user constraint.
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 like handler checked for an existing like and then inserted a new record without doing both atomically, so concurrent requests all passed the check.
Impact
Engagement metrics could be corrupted, trending and recommendation logic could be skewed, and the inflated counts may damage business trust; the same method also works for dislikes.
What the attacker needed
A logged-in account; ability to intercept and replay requests
How it was found
- Open a product review page and find the like button.
- Click like while intercepting the request in a proxy.
- Clone the captured request about ten times in the repeater.
- Send all the cloned requests in parallel as a group.
- Refresh the page and see the like count rise by the number of requests sent.
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 is when a program checks something and then acts on it, and two requests slip through the gap between the check and the action. Here the site was meant to let each person like a review only once, but firing many requests at the same instant meant several got past the check before any like was saved. The result is fake engagement numbers that look real.
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.