Skip to content
Race condition Write-up Intermediate

Delete any comment without admin privilege

A race condition in the comment-reporting function let a single user send many report requests in one packet, bypassing the intended one-report-per-user limit. This caused the reported comment to be deleted without admin rights and exhausted the SMTP server, delaying email delivery.

medium.com

Published on medium.com

A Cyber security researcher has a Bachelor’s degree in computers and artificial intelligence working as a penetration tester and a part-time Bug Bounty Hunter. https://www.linkedin.com/in/ahmed-essam-4a4306203/

A.Essam, 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 report endpoint enforced the one-report-per-user rule with a check-then-act pattern that was not atomic, so concurrent requests all passed the check before any report was recorded.

Impact

An attacker could delete other users' comments without admin privileges and could exhaust the SMTP server, delaying or blocking email delivery; the author notes the WAF was an old version and did not stop the flood.

What the attacker needed

A free account; a second account to report from; Burp Suite with Turbo Intruder; victim has a comment to report

The fix

The report endpoint should enforce a strict per-user rate limit and one-report-per-user rule atomically, with CAPTCHA and email throttling to protect the mail server.

How it was found

  1. Sign up and post a comment on a hotel page as the victim account.
  2. Switch to a second account and intercept the comment-report request in Burp Suite.
  3. Send the intercepted request to Turbo Intruder.
  4. Run a single-packet race attack with the payload set to null and a limit of 50.
  5. Observe that the comment is deleted and that report emails arrive very late or not at all.

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 program checks something and then acts on it, but many requests arrive at the same moment before the check finishes. Here the site meant to allow only one report per user, but sending many reports at once tricked it into treating the comment as heavily reported and removing it. The same flood also overwhelmed the email server, so legitimate emails arrived very late.

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.

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.