Skip to content
Race condition Write-up Intermediate

From Owner to Orphaned: Exploiting a Race Condition in Organizati

The application enforced that an organisation must always keep an owner and that owners cannot be deleted, but sending a transfer-ownership request and a delete-member request at the same time let the backend process them in parallel. The targeted member was deleted after being made owner, leaving the organisation with no owner and possibly no administrative roles at all.

Amed Sherif Follow

Published on medium.com

Bug bounty hunting often feels like a race against the system — sometimes literally. That’s exactly what happened when I, Ahmed Sherif (@vultra), discovered a race condition that allowed me to bypass role‑based restrictions and delete the owner of an organization, leaving it without any administrative roles at all.

Amed Sherif, 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 ownership transfer and member deletion were handled as separate operations without a lock or transaction, so the 'must keep an owner' rule was checked before the parallel delete took effect.

Impact

The organisation could be left with no owner and, if no admins remained, no administrative roles at all, making it unmanageable until manual recovery.

What the attacker needed

An account able to transfer ownership; an account able to delete members; ability to send requests in parallel

How it was found

  1. Intercept the organisation's member-management traffic in a proxy tool.
  2. Prepare one request that transfers ownership to a chosen member.
  3. Prepare a second request that deletes that same member.
  4. Send both requests at the same time so the backend handles them in parallel.
  5. Observe that the member is deleted after being made owner, leaving the organisation without an owner.

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.

An organisation in this app must always have an owner, and the app blocks deleting the owner. The researcher sent two actions at almost the same instant: one made a member the new owner, the other deleted that same member. Because the server handled both at once, the delete went through after the promotion, so the organisation ended up with nobody 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.

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.