Skip to content
Access control Write-up Beginner

Full Privilege Escalation from Agent to Admin Leads to Team Takeover

The team invitation request accepted a client-supplied role value and team identifier without server-side checks, so a low-privilege user could invite themselves as an admin and point the request at another team. The same invitation could also be reused after removal, allowing a removed admin to regain access.

abdelrahman0x01 Follow

Published on medium.com

During a pentesting engagement at CyberAR, I discovered a privilege escalation vulnerability that allowed low-privilege users to escalate their privileges and take over any team.

Abdelrahman0x01, 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 trusted the role and team identifiers supplied in the invitation request and never checked that the sender was allowed to assign that role or act on that team, and invitations were not invalidated after use or removal.

Impact

A low-privilege user could gain admin rights over any team on the platform and could regain access after being removed, leading to full team takeover.

What the attacker needed

A low-privilege account; ability to invite a user to a team; a proxy to edit the request

The fix

The server should derive the role and team from the authenticated session and the inviter's permissions, and invitations should expire and be invalidated once used or when the member is removed.

How it was found

  1. Invite a user to your own team with the agent role and intercept the request.
  2. Change the role value in the request from the agent value to the admin value and resend it.
  3. Observe that the invited user now has admin rights.
  4. Change the team identifier in the request to another team's identifier, keep the admin role value, and resend.
  5. Observe that you now hold admin rights on that other team.
  6. After a super admin removes an admin, reuse the same invitation to regain access.

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.

A website should decide what you are allowed to do on its own server, not trust values your browser sends. Here the invite form sent a number saying which role to give and another saying which team to join, and the server simply believed both. So someone with a low-level account could ask to be made an admin of any team, and could keep rejoining a team even after being removed.

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.