Role Management Logic Bug Leads to Unlimited Resource Access
A user could be invited as a Developer to an organisation despite already owning the maximum number of projects, and then promoted directly to Owner, bypassing the limit check that blocked promotion to Administrator. This allowed the attacker to gain Owner permissions in multiple organisations and remove the original owners.
medium.com
Published on medium.com
At first, I started reviewing how roles are distributed inside the organization system. The roles were defined as follows:
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
What the attacker needed
Attacker has an account; attacker can create organisations and projects; victim invites attacker as Developer
How it was found
- Create two users, each with their own organisation and one project.
- Have each user invite the other as Administrator to their organisation.
- Attempt to create a new project in one organisation and observe the limit error.
- Have user2 create two projects in org2, then try to invite user2 to org1 as Administrator or Owner (both rejected).
- Invite user2 to org1 as Developer (accepted).
- Attempt to change user2's role from Developer to Administrator (rejected), then directly to Owner (accepted).
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 Owner or Administrator that control what they can do. The app tried to limit how many projects a user could own, but it only checked this limit when promoting someone to Administrator, not when promoting directly to Owner. So an attacker could skip the check and become Owner, gaining full control.
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.