Skip to content
Access control Write-up Intermediate

How I Turned One Admin Account Into a Full Org Takeover

The backend API allowed any Admin to downgrade another Admin's role via a GraphQL mutation, even though the UI hid this option. After downgrading, the attacker could delete the former Admin through the normal UI, achieving full removal of a protected account.

medium.com

Published on medium.com

Note: The target’s name has been withheld and replaced with example.com, since this report is still under responsible disclosure / private to the program.

ameensec, 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 backend API lacked an authorization check to prevent an Admin from modifying another Admin's role, relying only on the UI to hide the option.

Impact

An Admin could downgrade and then delete any other Admin, including the original/founding Admin, leading to full organization takeover.

What the attacker needed

Attacker has an Admin account; victim is another Admin in the same org

The fix

The backend should enforce authorization checks to prevent Admins from modifying or deleting other Admins, not rely on UI restrictions.

How it was found

  1. Add a new member and assign them the ADMIN role.
  2. Call the GetOrganizationMembersQuery to retrieve the ID of every member, including other Admins.
  3. Send a manual GraphQL UpdateMember mutation to change another Admin's role to DEVELOPER.
  4. Use the UI to delete the now-downgraded account.

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.

In many apps, the user interface hides buttons to stop you from doing certain actions, but the server behind it may still accept those actions if you send the request directly. Here, an admin could use a tool to send a request that changes another admin's role, then delete them. This shows that hiding a button is not real security; the server must check permissions.

What is Access control?

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.