How I found BAC leads to De-escalate the Administrator privilege
A lower-privileged internal user could invite the organisation's administrator to the team, and the invitation silently downgraded the administrator's role. The administrator then lost the ability to approve invitations or manage the organisation, even though the interface still showed an admin role.
medium.com
Published on medium.com
Bug Bounty Tips
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.
Context
The target was an organisation-based web program. The feature at the centre of the report is the user invitation function: a member of an organisation can invite another person to join the team or organisation, and the invitation is then routed to an administrator for approval or rejection. The report describes three roles:
| Role | What the report says about it |
|---|---|
| Administrator | The highest role, which can control everything in the organisation |
| Internal User | Has permissions on some functions, including the invitation function, but can only invite users with the same privilege (Internal User), so cannot grant the admin role |
| External User | Not part of the attack, so the author does not discuss it |
The author's summary is that the bug lets a user de-escalate any user in their organisation who holds the administrator role to a lower privilege, even though the attacker has no permission to do so.
Setup
The author held the Internal User role and treated the administrator as the victim. Two accounts were involved:
- attacker email ==> [redacted]
- Victim Email ==> [redacted]
No tools, versions or other preconditions are described.
Finding it
While moving through the program, the author found the invitation function.

Inviting any user does not add them directly: the invitation request is forwarded to the admin for approval or rejection. The report shows the request as it appears from the admin's view.

The reasoning that led to the bug was about the asymmetry between the two sides. The attacker has a lower role, the victim has the administrator role, the attacker's invitation must be accepted by the admin, and the invited user is assigned the Internal User role. Chaining those facts together raised the question of what happens if the invitation targets the administrator himself.
Exploitation
Step 1: invite the administrator
As the Internal User, the author submitted an invitation for the administrator's own email address. The expectation was that the application would reject it because the email already exists. It did not: the admin was invited as a normal user and the invitation was forwarded to the admin's approval page.
Step 2: observe the result on the admin account
The admin was no longer an admin in the organisation and could not perform any of his functions, including approving invitations. The accept and ignore buttons had disappeared from the approval page.

The author's description of the resulting state is precise: the admin is no longer an admin logically, but in the UI the account still shows the admin role, while being unable to manage the organisation any more.
Root cause
The report attributes the bug to logic and to a deep understanding of the program rather than to a specific code defect, and it does not show the server-side implementation. The report does not show the server-side implementation, so the exact cause is not stated; the behaviour suggests the invitation flow did not treat an invitation aimed at an existing administrator as invalid. Instead, the invitation was processed as if the address were new, and the invited user was assigned the Internal User role. The result was that the account still showed the admin role in the UI but could no longer manage the organisation. The report attributes the bug to logic and does not state how the role change was persisted.
Impact
An Internal User, who by design cannot grant the admin role and cannot manage the organisation, can strip the administrator of the organisation of his effective privileges. The administrator then cannot carry out any of his functions, including approving invitations. The report frames this as de-escalation of any user in the attacker's organisation who holds the administrator role, and notes that the attacker does not have the permission to do this.
Fix
Variants to test
- Invite the email of an existing administrator from a lower-privileged account and watch the admin's session: a positive result is that the admin loses access to approval or management functions while the UI still shows the admin role.
- Invite the email of an existing member with a role other than the one the inviter can grant: a positive result is that the member's effective permissions change to the invited role.
- Invite your own email from your own account: a positive result is that your role is reassigned or your permissions change.
- Repeat the invitation after the first one has been processed, to see whether the duplicate-email check is missing consistently: a positive result is a second successful invitation for an address that is already a member.
- Try the same flow with other role-assignment paths, such as adding a member directly rather than by invitation: a positive result is that an existing administrator's role is overwritten through that path as well.
What happened, in plain words
A website let people who belong to an organisation invite other people to join it. The invitation did not take effect straight away: it went to an administrator, who had to approve or reject it. The author of the report had a middle-level account, called an Internal User, which was allowed to send invitations but only for people who would get the same middle-level role. It was not allowed to create administrators.
The author tried something odd: they sent an invitation to the email address of the organisation's own administrator. The website should have said that this person was already a member, but it did not. It treated the administrator as a brand-new person and put an invitation on the administrator's own approval page. The result was that the administrator stopped being an administrator in practice. The account still displayed the administrator role on screen, but the person could no longer do any administrator work, including approving invitations. The buttons for accepting and ignoring invitations had disappeared.
So a user with a lower role managed to take away the powers of the highest role in the organisation, even though that user had no permission to do anything of the kind. The author calls this de-escalation: pushing an account down to a lower level of privilege.
The program and its roles
The target was an organisation-based web program. "Organisation-based" means the site is built around groups of people, like a company workspace: several people share one space, and each person has a role that decides what they can do inside it. Think of a shared household account where some people can change the settings and others can only look at the shopping list.
The feature at the centre of the report is the invitation function. A member of the organisation can invite another person to join the team or organisation. The invitation is not applied immediately; it is routed to an administrator, who approves or rejects it. This is like a receptionist writing a visitor pass and the manager having to sign it before the door opens.
The report describes three roles:
| Role | What the report says about it |
|---|---|
| Administrator | The highest role, which can control everything in the organisation |
| Internal User | Has permissions on some functions, including the invitation function, but can only invite users with the same privilege (Internal User), so cannot grant the admin role |
| External User | Not part of the attack, so the author does not discuss it |
A role is simply a label attached to an account that the website checks before allowing an action. "Privilege" means how much an account is allowed to do. "De-escalate" means to lower someone's privilege. The author's summary is that the bug lets a user de-escalate any user in their organisation who holds the administrator role to a lower privilege, even though the attacker has no permission to do so.
The setup
The author held the Internal User role and treated the administrator as the victim. Two accounts were involved:
- attacker email ==> [redacted]
- Victim Email ==> [redacted]
These are placeholder addresses used in the report to stand for the attacker's account and the administrator's account. No tools, software versions or other preconditions are described.
Finding the invitation function
While moving through the program, the author found the invitation function.

Inviting any user does not add them directly: the invitation request is forwarded to the admin for approval or rejection. The report shows the request as it appears from the admin's view.

This screenshot shows the invitation from the admin's view. The important detail is the two-step nature of the flow: the inviter proposes, the administrator decides.
The reasoning that led to the bug was about the asymmetry between the two sides. The attacker has a lower role, the victim has the administrator role, the attacker's invitation must be accepted by the admin, and the invited user is assigned the Internal User role. Chaining those facts together raised the question of what happens if the invitation targets the administrator himself. In everyday terms: the receptionist can only write visitor passes for ordinary visitors, and the manager signs them. What if the receptionist writes a visitor pass for the manager?
Exploitation
Step 1: invite the administrator
As the Internal User, the author submitted an invitation for the administrator's own email address. The expectation was that the application would reject it because the email already exists. A well-built site normally refuses to add someone who is already a member, just as a club refuses to enrol a person who is already on the member list.
It did not refuse. The admin was invited as a normal user and the invitation was forwarded to the admin's approval page. In other words, the site treated the administrator's address as if it belonged to a new user.
Step 2: observe the result on the admin account
The admin was no longer an admin in the organisation and could not perform any of his functions, including approving invitations. The accept and ignore buttons had disappeared from the approval page.

The author's description of the resulting state is precise: the admin is no longer an admin logically, but in the UI the account still shows the admin role, while being unable to manage the organisation any more. "UI" means user interface, the part of the website you see and click. So the label on the account said administrator, but the permissions behind it had been taken away.
Why it worked
The report attributes the bug to logic and to a deep understanding of the program rather than to a specific code defect, and it does not show the server-side implementation. "Logic bug" means the individual pieces of the program work as written, but the way they are combined produces a result nobody intended. It is like a form that accepts any date because each field is checked separately but nobody checks that the date is in the future.
The report does not show the server-side implementation, so the exact cause is not stated; the behaviour suggests the invitation flow did not treat an invitation aimed at an existing administrator as invalid. Instead, the invitation was processed as if the address were new, and the invited user was assigned the Internal User role. The result was that the account still showed the admin role in the UI but could no longer manage the organisation. The report attributes the bug to logic and does not state how the role change was persisted.
Impact
An Internal User, who by design cannot grant the admin role and cannot manage the organisation, can strip the administrator of the organisation of his effective privileges. The administrator then cannot carry out any of his functions, including approving invitations. The report frames this as de-escalation of any user in the attacker's organisation who holds the administrator role, and notes that the attacker does not have the permission to do this.
Fix
In plain terms: before queuing an invitation, look up the address in the member list, and if it is already there, stop.
Variants to test
These are follow-up experiments in the same spirit, useful for anyone learning how to explore a feature like this:
- Invite the email of an existing administrator from a lower-privileged account and watch the admin's session: a positive result is that the admin loses access to approval or management functions while the UI still shows the admin role.
- Invite the email of an existing member with a role other than the one the inviter can grant: a positive result is that the member's effective permissions change to the invited role.
- Invite your own email from your own account: a positive result is that your role is reassigned or your permissions change.
- Repeat the invitation after the first one has been processed, to see whether the duplicate-email check is missing consistently: a positive result is a second successful invitation for an address that is already a member.
- Try the same flow with other role-assignment paths, such as adding a member directly rather than by invitation: a positive result is that an existing administrator's role is overwritten through that path as well.
Glossary
- Organisation-based program: a website built around groups of users who share a workspace, each with a role that controls what they can do.
- Role: a label on an account that the site checks before allowing an action, such as Administrator or Internal User.
- Privilege: the amount of access or power an account has.
- Administrator: in this report, the highest role, able to control everything in the organisation.
- Internal User: in this report, a middle role that can use some functions, including inviting people, but only at its own level.
- External User: in this report, a role outside the attack, not discussed by the author.
- Invitation function: the feature that lets a member propose a new person for the organisation, subject to administrator approval.
- Approval flow: a two-step process where one person requests something and another person with more authority accepts or rejects it.
- De-escalation: lowering an account's privilege, here taking away an administrator's powers.
- Logic bug: a flaw where each part of the program works as written but their combination produces an unintended result.
- Root cause: the underlying reason a bug exists, as opposed to its visible symptom.
- UI (user interface): the part of a website a person sees and clicks, such as buttons and labels.
- Session: the period during which a website remembers who you are after you log in.
- Server-side implementation: the code that runs on the website's own computers, which visitors cannot see.
- Duplicate-email check: a validation that refuses to add an address that is already registered or already a member.
- Impact: the harm a bug can cause in practice.