Skip to content
Access control Write-up Beginner

Unveiling Access Control Flaws: Taking over an entire organization

A low-privileged user could send a request to the invitations endpoint with an admin role, adding a new admin to the organisation. The attacker could then log in as that admin and take over the organisation.

im0thmann Follow

Published on medium.com

In this write-up I want to share with you the story of a recent finding I discovered during testing a web application.

Mohamed Othman, 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 when processing the invitation request.

Impact

A regular user could add an admin account and then take over the entire organisation by logging in with that account and removing the existing admin.

What the attacker needed

A low-privileged user account

How it was found

  1. Send a POST request to the invitations endpoint as a low-privileged user.
  2. Include an email address and set the role to admin in the request body.
  3. The server responds with success and creates an admin invitation.
  4. Log in with the attacker email address to access the organisation as an admin.

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 web apps, users have different roles, like admin or regular user. The app is supposed to check that only admins can add other admins. Here, the server did not check the role of the person making the request, so a regular user could add an admin account and then use it to control the whole organisation.

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.