Privilege Escalation: How to Make Yourself an Admin
The application allowed an existing low-privilege member to change their email address to an unregistered address, then accept an invitation sent to that address and gain the assigned role, potentially Admin. An attacker could thus escalate privileges within an organisation.
medium.com
Published on medium.com
Bug Bounty
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 a SaaS application on HackerOne, referred to here as sass_app.com for privacy. The application supports multiple organizations, and each organization has roles such as Admin / Owner, Developer and Read-only, among others.
The feature at the centre of the report is the invitation functionality. An organization admin can invite a new member and assign them any available role, including Admin. Because the invitation carries a role that can be administrative, the flow is an authorization boundary worth examining: whoever ends up accepting the invitation inherits the role the admin chose.
The normal flow is:
Admin ↓Invite [redacted] ↓Invitation email ↓User accepts invitation ↓User joins the organization with the assigned role
Setup
The researcher worked against a SaaS program on HackerOne. The report does not name the program, the application version, or the tooling used. The relevant preconditions are:
- An organization admin has sent an invitation to a specific email address, with a role assigned to it.
- The attacker is able to control, or obtain access to, that invited email address.
- The attacker has, or can create, an account on the application.
The researcher's own account in the second, successful chain is described as an existing account with low privileges.
Finding it
The invitation feature stood out because an admin can assign any role, including Admin, to an invitee. That makes the identity of the person who accepts the invitation security-critical: if an attacker can accept an invitation meant for someone else, they receive whatever role the admin assigned, up to administrator of the whole organization.
The researcher asked what happens if an attacker can somehow control the invited email address. The first observation was that the application did not require email verification during account registration. That suggested a chain in which the attacker registers an account using the invited address and then collects the invitation.
Exploitation
Step 1: Register with the invited address
The attacker knows an invitation was sent to [redacted]. They create an account using that same address through the /api/register endpoint, then log in normally.
Step 2: Retrieve the invitation
Once logged in, the attacker obtains the invitation link from the */v1/invitations* endpoint.
Step 3: Accept and join
The attacker accepts the invitation and joins the victim organization with the role the admin assigned. If that role was Admin, the attacker becomes an administrator of the whole organization.
The researcher submitted this chain to the program. The program team replied that what had been uncovered was a flaw in their /register process, which was out of scope: the registration path used was not enabled in production and was therefore not considered valid. The whole attack chain depended on a registration flow the program would not accept, so the High-severity finding was heading towards being a false positive.
Step 4: Change an existing account's email instead
Rather than abandon the report, the researcher went back to their notes. They had previously noticed that an existing organization member could change their email address, through the API only, to an unregistered email address. That provided a second way to control the invited address, without creating a new account.
The revised chain was:
Existing attacker account (low priviliges) ↓Change email ↓Set it to the invited email ↓Obtain the invitation ↓Accept it ↓Join the organization ↓Receive the assigned role
The researcher tested it and it worked.
Root cause
The chain worked because invitations are keyed to an email address and the invitation endpoint returned the invitation to whichever account held that address. Two design decisions combined to break that assumption:
- Registration did not require email verification, so an account could be created for an address the registrant did not control.
- An existing member could change their account's email address through the API to an unregistered address, again without verification.
After changing the account email to the invited address, the researcher obtained the invitation from the invitations endpoint and accepted it. The role assigned by the admin is then granted to the attacker's account.
Impact
If the invitation was for an Admin role, an attacker holding a low-privilege account could gain full administrative control over the organization. From there, the report states, this could lead to complete compromise of the organization's data, settings and members. The impact depends on an admin having issued an invitation with an administrative role to an address the attacker can take over, and on the attacker being able to change their account's email to that address.
Fix
The report does not describe a fix or a retest.
Variants to test
- Invitation claim without verification. On a multi-tenant application, have an admin invite an address you control and register or change an account to that address without verifying it. A positive result is that the invitation appears in your account's invitation list and can be accepted with the assigned role.
- Email change through the API. Look for an API endpoint that updates the account email. A positive result is that the change is accepted for an unregistered address and the account can then claim invitations sent to it.
- Role assigned on invitation. Check whether invitations can carry administrative roles. A positive result is an invitation that, once accepted, grants Admin or Owner rights over the organization.
- Invitation listing endpoint. Enumerate the invitations endpoint for your own account after changing the email. A positive result is that invitations addressed to the new address are returned to your session.
- Registration without verification. Where self-registration exists, register with an address you do not control and check whether the account can be used before any verification step. A positive result is a usable session for an unverified address.
The lesson
The researcher's conclusion is that a finding should not be dropped just because one part of the attack chain is blocked. When the program said registration was not an active production path, the notes on the application revealed another route to the same goal. Keeping good notes during hunting is what made the second chain possible. The researcher credits Jayesh for inspiring the main idea of the bug.
What happened, in plain words
A security researcher found a way to become an administrator of someone else's organization on a web application. The application lets organizations invite new members and give them a role, and one of those roles is Admin. If you can accept an invitation that was meant for someone else, you get whatever role the admin picked, including Admin.
The researcher's first idea was to create a new account using the invited email address, because the application did not check that you really own an email address when you sign up. The company said that sign-up path was not switched on in production, so it was out of scope and would not count. Instead of giving up, the researcher remembered something from their own notes: an existing member could change their account's email address through the API to any address, including one that was never registered. That gave a second way to take over the invited address, and it worked.
This article walks through the whole story from zero. You only need to know how to use a browser. Every technical word is explained the first time it appears, and there is a glossary at the end.

The target and the feature
The target was a SaaS application found through HackerOne. HackerOne is a platform where companies publish programs and security researchers send them reports about weaknesses. A SaaS application is software you use over the internet instead of installing it on your own computer, like an online calendar or an online invoicing tool. For privacy the researcher calls the target sass_app.com, which is not its real name.
The application supports multiple organizations. Think of an organization as a shared workspace: a company signs up, and its people all work inside that one space, with their own accounts. Each organization has roles, which are labels that decide what a person is allowed to do. The report lists these roles:
- Admin / Owner: the person in charge, who can change settings and manage members.
- Developer: someone who builds or configures things inside the workspace.
- Read-only: someone who can look but not change anything.
- and others, which the report does not name.
The feature at the centre of the story is the invitation functionality. An organization admin can invite a new member by typing their email address and choosing a role for them, and any available role can be chosen, including Admin. The invitation is then sent by email, and when the invited person accepts it, they join the organization with the role the admin picked.
That is worth a closer look because of a simple question: who exactly ends up accepting the invitation? Whoever does gets the role. If the role is Admin, that person becomes an administrator of the whole organization. Security people call this kind of boundary an authorization boundary: the application has to be sure that the person doing something is the person who is allowed to do it.
The normal flow, as the researcher drew it, is:
Admin ↓Invite [redacted] ↓Invitation email ↓User accepts invitation ↓User joins the organization with the assigned role
Read it top to bottom. An admin invites [redacted]. The application sends an invitation email to that address. The person who owns that mailbox opens the email and accepts. They join the organization with the role the admin assigned. Nothing in that picture is unusual; the whole question is what happens when the person who accepts is not the person the admin had in mind.
Finding the bug
The researcher's starting thought was: what happens if an attacker can somehow control the invited email address? If the attacker can read the invitation that was sent to that address, they can accept it, and they receive the role the admin chose.
The first thing they noticed was that the application did not require email verification during account registration. Email verification means the application sends a message to the address you typed and asks you to click a link or enter a code, to prove the mailbox is really yours. Without that step, anyone can type any address when signing up, and the application has no way of knowing whether the person at the keyboard owns it.
That suggested a chain. A chain, in security, is a series of small steps where each one makes the next possible, like a row of dominoes. The researcher's first chain was:
- The attacker knows that an invitation was sent to
[redacted]. - The attacker creates an account using that same email address through the
/api/registerendpoint. - The attacker logs in normally.
- The attacker obtains the invitation link from the
*/v1/invitations*endpoint. - The attacker accepts the invitation.
- The attacker joins the victim organization with the role the admin assigned.
If the assigned role was Admin, the attacker would become an administrator of the whole organization.
Two words in that list need explaining. An endpoint is a specific address on a server that the application talks to, a bit like a counter in a large office building: each counter does one job, and you have to go to the right one. An API is the set of these counters that the application's own pages use behind the scenes; it is a way for software to talk to software, and it can also be called directly by a person with the right tools. /api/register is the counter that handles creating a new account, and */v1/invitations* is the counter that hands back your invitations. The asterisks in */v1/invitations* are the researcher's way of saying the exact path was not written down in full.
The researcher submitted this chain to the program. A program, here, is the company's bug bounty scheme: they invite researchers to report weaknesses and set rules about what counts. Then came the reply.
The problem: out of scope
The program team answered that what had been uncovered was a flaw in their /register process, which was out of scope. Out of scope means the company has decided in advance that a certain area is not part of the deal, so a report about it will not be accepted, even if the behaviour is genuinely wrong. They explained that the registration path the researcher used was not enabled in production. Production means the real, live version of the application that actual customers use, as opposed to a test version.
So the entire attack chain depended on a sign-up route the program would not consider valid. At that point, as the researcher puts it, a High-severity bug was heading towards becoming a false positive. Severity is a rough label for how serious a weakness is, and a false positive is a report that turns out not to be a real problem.
Going back to the notes
Instead of abandoning the report, the researcher went back to their notes about the application. Notes, in this context, are the little observations a researcher writes down while exploring: things that looked odd, things that worked in an unexpected way, things to come back to later. The researcher had previously noticed that an existing organization member could change their email address, through the API only, to an unregistered email address. "Through the API only" means the normal web page did not offer this, but the underlying endpoint accepted it anyway.
That gave a second way to control the invited address, and this time no new account was needed. The revised chain was:
Existing attacker account (low priviliges) ↓Change email ↓Set it to the invited email ↓Obtain the invitation ↓Accept it ↓Join the organization ↓Receive the assigned role
Read it top to bottom again. The attacker already has an ordinary account with low privileges, meaning it can do very little. They change the email address on that account. They set it to the address the invitation was sent to. They fetch the invitation. They accept it. They join the organization. They receive the role the admin assigned. The spelling of "priviliges" is as it appears in the researcher's diagram.
The researcher tested it, and it worked.
Why it worked
Invitations are tied to an email address, and after the email change the researcher could obtain and accept the invitation. Two design decisions broke that assumption:
- Registration did not require email verification, so an account could be created for an address the person signing up did not control.
- An existing member could change their account's email address through the API to an unregistered address, again without any verification.
Invitations are tied to an email address, and after changing the account email to the invited address the researcher obtained the invitation from the invitations endpoint. So controlling the address is enough to collect the invitation and accept it, and the role the admin assigned lands on the attacker's account.
Impact
If the invitation was for an Admin role, an attacker holding a low-privilege account could gain full administrative control over the organization. From there, the report says, this could lead to complete compromise of the organization's data, settings and members. The impact depends on two things: an admin having issued an invitation with an administrative role to an address the attacker can take over, and the attacker being able to change their account's email to that address.
Fix
The report does not describe a fix or a retest.
Variants to test
If you want to look for something similar, these are the checks the finding suggests. Each one describes what a positive result looks like, so you know when you have found something.
- Invitation claim without verification. On an application with multiple organizations, have an admin invite an address you control, then register or change an account to that address without verifying it. A positive result is that the invitation appears in your account's invitation list and can be accepted with the assigned role.
- Email change through the API. Look for an API endpoint that updates the account email. A positive result is that the change is accepted for an unregistered address and the account can then claim invitations sent to it.
- Role assigned on invitation. Check whether invitations can carry administrative roles. A positive result is an invitation that, once accepted, grants Admin or Owner rights over the organization.
- Invitation listing endpoint. After changing the email, look at the invitations endpoint for your own account. A positive result is that invitations addressed to the new address are returned to your session.
- Registration without verification. Where self-registration exists, register with an address you do not control and check whether the account can be used before any verification step. A positive result is a usable session for an unverified address.
The lesson
The researcher's conclusion is that a finding should not be dropped just because one part of the attack chain is blocked. When the program said registration was not an active production path, the notes on the application revealed another route to the same goal. Keeping good notes during hunting is what made the second chain possible. The researcher credits Jayesh for inspiring the main idea of the bug.
Glossary
- API: the set of endpoints an application's own pages use behind the scenes, a way for software to talk to software, which can also be called directly.
- Admin / Owner: the role in an organization with the most power, able to change settings and manage members.
- Attack chain: a series of steps where each one makes the next possible, together producing an attack.
- Authorization boundary: the line between what a person is allowed to do and what they are not, which the application must enforce.
- Bug bounty program: a company's scheme that invites researchers to report weaknesses under set rules.
- Developer: a role for someone who builds or configures things inside the workspace.
- Email verification: a step where the application sends a message to an address and asks you to confirm it, proving the mailbox is yours.
- Endpoint: a specific address on a server that does one job, such as creating an account or listing invitations.
- False positive: a report that turns out not to be a real problem.
- HackerOne: a platform where companies publish programs and researchers send reports.
- High severity: a rough label for a serious weakness.
- Invitation functionality: the feature that lets an admin invite a new member by email and assign them a role.
- Low privileges: an account that can do very little.
- Organization: a shared workspace on the application, with its own members and settings.
- Out of scope: an area the company has excluded in advance, so reports about it will not be accepted.
- Production: the real, live version of the application that customers use.
- Read-only: a role that can look but not change anything.
- Role: a label that decides what a person is allowed to do inside an organization.
- SaaS: software you use over the internet instead of installing it on your own computer.
- Session: the state of being logged in, which the application uses to recognise you between requests.
- Severity: a rough label for how serious a weakness is.