Skip to content
Race condition Write-up Intermediate

How I Found a Race Condition That Broke Organization Administration

The application allowed the last administrator to leave an organization by sending two concurrent requests to remove both administrators, bypassing the rule that an organization must always have at least one administrator. This left the organization with no administrators, preventing remaining members from managing the organization or deleting their accounts.

omaralgbry1 Follow

Published on medium.com

Many SaaS applications enforce a simple security rule “an organization should always have at least one administrator”. Without an administrator, no one can manage members, permissions, or organization settings which makes it pretty important right?

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

The application validates authorization against a stale snapshot of organization membership, so concurrent requests each see two administrators and both proceed.

Impact

The organization becomes orphaned: remaining members cannot promote themselves, add administrators, manage settings, transfer ownership, recover control, or leave, and they may be unable to delete their accounts, creating an operational denial-of-service.

What the attacker needed

Two administrator accounts in the same organization; ability to send concurrent requests

How it was found

  1. Identify that the leave organization and remove member actions use the same DELETE endpoint.
  2. Send two DELETE requests in parallel to remove both administrators (User A and User B).
  3. Observe that both requests succeed, leaving only a regular member (User C) in the organization.

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 two actions occur at the same time and the system checks something before either action finishes. Here, the system checked that there were two administrators, so it allowed both to be removed, but it did not expect both removals to happen together. This left the organization with no one in charge.

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 omaralgbry1

View all

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