Skip to content
Access control Write-up Intermediate

Regular User Can Invite Admin — Resulting in Full Organization Compromise

A regular user could send an invitation request with the admin role, and the system created a role-less account that was automatically treated as admin. This allowed the attacker to gain full control over the organization.

0xammarsaber Follow

Published on medium.com

A regular User can send an invitation with the Admin role. Instead of rejecting it, the system creates a role-less accountthat the application automatically treats as Admin, resulting in full organization takeover.

0xAmmar, 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 server did not verify that the requesting user had permission to assign the admin role, and the application defaulted accounts with no roles to admin privileges.

Impact

A low-privileged user could invite new admins, access all organization settings, add or remove users including real admins, and compromise the integrity of all organizational data, resulting in full organization takeover.

What the attacker needed

A regular user account; ability to capture and replay HTTP requests

How it was found

  1. Create an admin account and a separate user account with basic User role.
  2. Log in as the user and capture the HTTP request used by an admin to invite a new member.
  3. Replay the invitation request using the user's session cookies and set the role to admin.
  4. Observe that the server accepts the request and creates a new account with an empty roles array.
  5. Log in as the newly invited account and notice it has admin privileges despite having no roles.

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, users have roles like 'user' or 'admin' that decide what they can do. Here, a normal user was able to send a request that should only be allowed for admins, and the system didn't check properly. Even worse, when the new account had no role assigned, the app mistakenly gave it admin powers, letting the attacker take over the whole organization.

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.