Skip to content
Race condition Write-up Intermediate

Double Race Condition : Breaking Rules

The invite members feature allowed only one invitation per account unless the user subscribed to a paid plan. By sending multiple invite requests in parallel and then accepting them in parallel, an attacker could add multiple team members without paying.

medium.com

Published on medium.com

Today, I want to share an exciting discovery that allowed me to bypass plan restrictions and add members to my team without any limitations. This story involves a race condition that I uncovered while testing the invite members functionality on a public bug bounty program.

Mohamed Sayed, 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 invite and accept endpoints checked limits and state without an atomic lock, so parallel requests all passed the check before any state change was saved.

What the attacker needed

A free account on the platform; ability to send parallel HTTP requests

How it was found

  1. Intercept the invite request and send it to the repeater.
  2. Duplicate the request and change the username or email for different users.
  3. Group the requests and send them as parallel requests.
  4. Intercept the accept invitation requests for the invited users.
  5. Group the accept requests and send them in parallel.

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 a rule and then acts on it, but two requests arrive so close together that both pass the check before either one updates the record. Here, the site checked 'has this user already invited someone?' and then sent the invite, so firing many invites at once let several through. The same trick worked again when accepting the invites.

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.