Hidden Role, Full Takeover: How an Invite API Let Me Become an Organization Owner
The invite API accepted a numeric role value that mapped to a hidden technical role, allowing an attacker to escalate their privileges to organization Owner. This gave them full control over the organization, including billing, user management, and the ability to remove other owners.
Published on medium.com
Hello Hunters! I’m Ahmed Azzam (0xm394tr0n), and I’m excited to share my write-up with you, found in a private program on in hackerone.
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 properly validate the role parameter, accepting numeric values that mapped to an undocumented role with elevated privileges.
What the attacker needed
Access to the invite functionality; ability to intercept requests
How it was found
- Intercept the invite request using Burp Suite.
- Change the role value from 'read_only' to a numeric value.
- Send the request and observe that the server accepts it and assigns a hidden role.
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.
When you invite someone to a team, you pick a role like 'read only' or 'admin'. The server checks the role name you send, but if you send a number instead, it might accept a hidden role that gives you the highest permissions. This let the attacker become the owner of 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.