How I Became an Organization Owner via Invite Manipulation (Privi
The application blocked direct role escalation to Owner via a PATCH request, but the invite flow did not validate the role being assigned. An Admin could invite a new user with the Owner role and accept the invitation, becoming a second Owner and gaining full control of the organisation.
Published 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 invite endpoint did not validate the requested role against the inviter's privileges or the single-Owner rule, unlike the role-update endpoint.
Impact
An Admin could escalate to Owner, creating multiple Owners despite the restriction, leading to full organisation takeover including user management, sensitive data, billing, settings and ownership transfer.
What the attacker needed
An Admin account in the organisation; Ability to intercept HTTP requests
The fix
The invite endpoint should validate that the inviter cannot assign roles higher than their own, block assigning Owner via invites, and reject invites if an Owner already exists.
How it was found
- Create an organisation as the default Owner.
- Invite another account and assign it the Admin role.
- From the Admin account, invite a third account with the low-privilege Orders Manager role.
- From the Admin account, try to update the low-privileged user's role to Owner via a PATCH request; this returns 403.
- From the Admin account, invite a new user and intercept the request with a proxy.
- Modify the role in the invite request from OrdersManager to OWNER, then accept the invitation and log in as the new 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, different roles have different permissions. An Admin is powerful but should not be able to make themselves the Owner. Here, the app stopped an Admin from changing an existing user's role to Owner, but it forgot to check the role when sending an invitation. So the Admin sent an invite that said 'join as Owner', accepted it, and became an Owner.
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.