Complete Takeover/Hijack the Organizatoin
An admin-level user could change the account role identifier in requests to add or delete organisation owners, actions that should be restricted to owners. This allowed an admin to add multiple owners and then delete the real organisation owner, effectively taking over the organisation.
medium.com
Published on medium.com
Hello everyone, I hope you all are doing good. As many of you requested to me to write about my findings.
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 trusted a role identifier supplied in the request body instead of checking the caller's actual permissions.
Impact
An admin could add multiple owners and then delete the real organisation owner, leading to complete takeover of the organisation.
What the attacker needed
An admin account in the organisation
How it was found
- Log in with an owner account and add an organisation owner by changing the account role identifier in the JSON body.
- Log in with an admin account and add an account owner by changing the same account role identifier.
- From the admin account, attempt to delete a normal test member and capture the request.
- Replace the resource identifier in the delete request with the real organisation owner's identifier.
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, each user has a role such as admin or owner. The app is supposed to check that only an owner can add or remove other owners. Here, an admin could simply change a number in the request to make the system treat them as if they had owner rights, so they could remove the real owner and take 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.