Skip to content
Access control Write-up Beginner

Bypassed the Invite Flow, Gained Admin Access

A company owner could disable a pending invitation, but the backend still treated the invited user as a member of the company. By sending API requests directly with their own token, the invited user could act as a full admin of the company.

medium.com

Published on medium.com

In this write-up, I’ll share how I discovered a Broken Access Control (BAC) vulnerability in a web application. This bug allowed me to gain full admin access to a company — even after my invitation was disabled..

Killua199, 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 backend authorised requests based only on a valid token and the user appearing in the invite list, without checking whether the invitation had been accepted or was still enabled.

Impact

The invited user could access the company and act as a full admin, including inviting users, removing members and re-inviting themselves, even though the invite had been disabled.

What the attacker needed

Two accounts; owner invites attacker as admin; owner disables the invite; attacker keeps a valid token

How it was found

  1. Create two accounts, one as company owner and one as the invited user.
  2. From the owner account, invite the second account as an admin.
  3. Before the invite is accepted, disable the invitation from the owner account.
  4. Log in as the invited account and capture its authorisation token.
  5. Send API requests directly with that token, bypassing the frontend.

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 company in an app, the app should stop them joining if you cancel the invite. Here the website's screens blocked the cancelled user, but the server behind them did not check whether the invite was still active. So the person could talk to the server directly and still get in as an admin.

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.