My P1 — Account Takeover
A group admin could change a member's email address to a victim's email, then trigger a password reset that updated the victim's password instead of the member's. This allowed the attacker to log in as the victim without any interaction from them.
While I am hunting on one target named example.com (all will name redacted.com). There is an invite Functionality on their website.
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
This is a write-up of my first P1, an account takeover that came out of an invite feature on a target whose name is redacted. The target is referred to throughout as example.com, with all names redacted to redacted.com. The feature in question lets one user invite another user into a group. Once the invited user accepts, both users sit in the same group, and the inviter (as admin) can send the invited user a password reset email.
The report does not describe the underlying stack, the endpoint paths, the request bodies or the server responses. What it does describe is the sequence of actions and the state changes that produced the takeover.
Setup
Two accounts are needed, both controlled by the researcher:
- User-A, the attacker. This account creates the group and acts as admin, which gives it the privilege to send a reset password mail to other members.
- User-B, a second account standing in for a friend of the attacker. This account is invited into the group and accepts.
A third party, the victim, is only needed as an email address. The victim never interacts with the site during the attack.
No tools, versions or specific requests are given in the report. The whole flow is performed through the site's normal web interface.
Finding it
While hunting on the target I noticed the invite functionality and started playing with it. The interesting part was the combination of two capabilities that the group model gives the admin: the ability to invite users, and the ability to trigger a password reset mail for a member of the group.
What looked wrong was the order of operations. A reset link is issued for User-B, but User-B does not use it to change the password. Instead, the email address on User-B's account is changed to the victim's address, and only then is the password changed. The password that gets updated is not User-B's: it is the victim's. That is the behaviour I set out to confirm.
Exploitation
Step 1: Create the group and invite User-B
User-A invites User-B through the invite functionality. User-B accepts, and the two accounts are now in the same group. User-A is the admin of that group.
Step 2: Send the reset password mail
As admin, User-A asks User-B to reset the password. User-A has the privilege to send the reset password mail to User-B, so User-B receives a reset password link by email.
Step 3: Open the link but do not use it
User-B opens the reset password link and deliberately does not change the password. The link has now been visited, but the account's password is untouched.
Step 4: Change User-B's email to the victim's email
With the reset flow in this half-finished state, User-A changes the email address on User-B's account to the victim's email address. The report shows this state change but does not include the request that performs it.
Step 5: Change the password
User-B now changes the password. The expectation is that User-B's own password is updated. In practice, the victim's password is the one that gets updated.
I was, in my own words, asking what was happening: without any interaction from the victim, the password changed and I could log in with the new credentials that User-B had set.
Result
The account that ends up with the new password is the victim's, and the attacker can authenticate with it. The victim never clicked anything, never opened a mail and never visited the site during the attack.
Root cause
The report does not include the code, so the following is inferred from the behaviour. The report does not explain the mechanism behind the behaviour. When the email on the account is changed after the link is opened, the pending reset follows the account, and the password change is applied to whatever identity the account now resolves to. Because the email now points at the victim, the victim's password is the one that is written.
Impact
Without any interaction from the victim, an account can be taken over by knowing only the victim's email address. The attacker ends up with working credentials for the victim's account.
The precondition is the invite and group model described above: the attacker needs an account that can create a group, invite a second account, and send that second account a reset password mail as admin.
Fix
It records only that the issue was rewarded and resolved on 24 February 2023, and that the payout was the program's highest.
Variants to test
- Email change after a reset link is opened. On any site with a reset flow, open the link, then change the account email before submitting the new password. A positive result is that the password change lands on the account behind the new email rather than the original one.
- Email change after the reset is requested but before the link is opened. Same idea, earlier in the flow. A positive result is that the old link still works and applies to the new address.
- Group or team admin sending resets to members. Look for any feature where an admin can trigger a reset for another member, then combine it with a profile email change. A positive result is a reset that follows the changed email.
- Invite acceptance followed by profile edits. Accept an invite, edit the profile email, then complete any pending account action. A positive result is that the pending action applies to the edited identity.
Timeline
| Event | Date and time |
|---|---|
| Reported through mail | 20 Feb 2023, 10:21 PM |
| Accepted and invited to the private program | 21 Feb, 18:28 |
| Rewarded and resolved | 24 Feb 2023 |
The report notes that the issue was rated P1 and that they paid their highest pay.
Get the Medium app


What happened, in plain words
A security researcher found a way to take over someone else's account on a website without that person doing anything at all. The only thing the attacker needed to know was the victim's email address. The trick involved a feature that lets one user invite another user into a group, and a password reset email that the group admin can send to a member. By changing the invited user's email address to the victim's email address at just the right moment, the password change that followed was applied to the victim's account instead of the invited user's account. The researcher reported it, the company accepted it as a P1 (their highest priority), invited the researcher to their private bug bounty programme, and paid their highest reward.
This article walks through the same steps the researcher took, explaining every concept from scratch so that someone who has never done security work can follow along.
Context
This is a write-up of a first P1 finding: an account takeover that came out of an invite feature on a target whose name is redacted. Throughout the report the target is called example.com, and all names are redacted to redacted.com. The feature lets one user invite another user into a group. Once the invited user accepts, both users are in the same group, and the inviter (as admin) can send the invited user a password reset email.
The report does not describe the underlying technology stack, the endpoint paths, the request bodies or the server responses. What it does describe is the sequence of actions and the state changes that produced the takeover.
Concepts you need first
- Bug bounty programme: a scheme where a company invites outside researchers to look for security problems in its systems and pays them for reporting the problems responsibly. A private programme is one you can only join by invitation.
- P1: a priority rating. On many programmes P1 is the highest severity level, meaning the most serious kind of bug.
- Account takeover (ATO): when an attacker gains control of someone else's account, for example by learning or changing their password, so they can log in as that person.
- Invite feature: a common product feature where an existing user can ask someone else to join a group, team or workspace. The invited person receives an email or notification and accepts.
- Group admin: the user who created or manages a group. Admins often have extra powers, such as adding or removing members.
- Password reset flow: the usual "forgot my password" process. The site emails you a special link; clicking it proves you control the email address, and it lets you set a new password.
- Email address on an account: the contact address stored in your profile. Sites use it to identify you and to send you security emails.
- State change: any time data on the server changes, such as a new group member, a new email address or a new password.
Setup
Two accounts are needed, both controlled by the researcher:
- User-A, the attacker. This account creates the group and acts as admin, which gives it the privilege to send a reset password email to other members.
- User-B, a second account standing in for a friend of the attacker. This account is invited into the group and accepts.
A third party, the victim, is only needed as an email address. The victim never interacts with the site during the attack.
No tools, versions or specific requests are given in the report. The whole flow is performed through the site's normal web interface.
Why two accounts?
Think of a magic trick where the magician needs an assistant. User-A is the magician: the account that sets things up and pulls the strings. User-B is the assistant: a real, ordinary account that the magician controls, used to stand in for a normal member of the group. The victim is the person in the audience whose watch disappears. The victim never touches anything; that is the whole point.
Finding it
While hunting on the target I noticed the invite functionality and started playing with it. The interesting part was the combination of two capabilities that the group model gives the admin: the ability to invite users, and the ability to trigger a password reset email for a member of the group.
What looked wrong was the order of operations. A reset link is issued for User-B, but User-B does not use it to change the password. Instead, the email address on User-B's account is changed to the victim's address, and only then is the password changed. The password that gets updated is not User-B's: it is the victim's. That is the behaviour I set out to confirm.
Why this is suspicious
A password reset link is meant to prove that the person clicking it controls the email address on the account. If the account's email address can be changed after the link is issued, then the link may no longer be proving anything about the original owner. That mismatch is the seed of the bug.
Exploitation
Step 1: Create the group and invite User-B
User-A invites User-B through the invite functionality. User-B accepts, and the two accounts are now in the same group. User-A is the admin of that group.
Why: the admin role is what unlocks the ability to send a reset email to another member. Without the group, User-A would have no power over User-B's account.
Step 2: Send the reset password email
As admin, User-A asks User-B to reset the password. User-A has the privilege to send the reset password email to User-B, so User-B receives a reset password link by email.
Why: this creates a pending password reset on User-B's account. A pending reset is like a half-finished form: the site has recorded that a reset is in progress, but the new password has not been saved yet.
Step 3: Open the link but do not use it
User-B opens the reset password link and deliberately does not change the password. The link has now been visited, but the account's password is untouched.
Why: opening the link puts the reset flow into a particular state. The researcher wanted to see what happens if the flow is left hanging at that point. It is like opening a door and standing in the doorway without walking through.
Step 4: Change User-B's email to the victim's email
With the reset flow in this half-finished state, User-A changes the email address on User-B's account to the victim's email address. The report shows this state change but does not include the request that performs it.
Why: this is the pivot. The account that started the reset (User-B) now carries the victim's email address. If the site later decides whose password to change by looking at the email field, it will now see the victim's address.
Step 5: Change the password
User-B now changes the password. The expectation is that User-B's own password is updated. In practice, the victim's password is the one that gets updated.
I was, in my own words, asking what was happening: without any interaction from the victim, the password changed and I could log in with the new credentials that User-B had set.
Why this matters: the attacker now holds a working password for the victim's account. The victim did nothing: no click, no email opened, no visit to the site.
Result
The account that ends up with the new password is the victim's, and the attacker can authenticate with it. The victim never clicked anything, never opened an email and never visited the site during the attack.
Root cause
The report does not include the code, so the following is inferred from the behaviour. The report does not explain the mechanism behind the behaviour. When the email on the account is changed after the link is opened, the pending reset follows the account, and the password change is applied to whatever identity the account now resolves to. Because the email now points at the victim, the victim's password is the one that is written.
A plain comparison
Imagine a coat check at a theatre. You hand in your coat and get a ticket. The ticket is supposed to be tied to your coat. But suppose the cloakroom attendant writes the ticket against the hook number, not the coat. If someone swaps the coat on that hook while you are in the bar, your ticket now fetches the other person's coat.
Impact
Without any interaction from the victim, an account can be taken over by knowing only the victim's email address. The attacker ends up with working credentials for the victim's account.
The precondition is the invite and group model described above: the attacker needs an account that can create a group, invite a second account, and send that second account a reset password email as admin.
Fix
It records only that the issue was rewarded and resolved on 24 February 2023, and that the payout was the programme's highest.
Variants to test
- Email change after a reset link is opened. On any site with a reset flow, open the link, then change the account email before submitting the new password. A positive result is that the password change lands on the account behind the new email rather than the original one.
- Email change after the reset is requested but before the link is opened. Same idea, earlier in the flow. A positive result is that the old link still works and applies to the new address.
- Group or team admin sending resets to members. Look for any feature where an admin can trigger a reset for another member, then combine it with a profile email change. A positive result is a reset that follows the changed email.
- Invite acceptance followed by profile edits. Accept an invite, edit the profile email, then complete any pending account action. A positive result is that the pending action applies to the edited identity.
Timeline
| Event | Date and time |
|---|---|
| Reported through email | 20 Feb 2023, 10:21 PM |
| Accepted and invited to the private programme | 21 Feb, 18:28 |
| Rewarded and resolved | 24 Feb 2023 |
The report notes that the issue was rated P1 and that they paid their highest pay.
Get the Medium app


Glossary
- Account takeover (ATO): when an attacker gains control of another person's account, usually by obtaining or setting their password.
- Admin: a user with extra permissions in a group, team or workspace, such as the ability to manage members.
- Bug bounty programme: a scheme where a company pays outside researchers for responsibly reporting security problems.
- Credentials: the information used to log in, typically an email address or username plus a password.
- Email address on an account: the contact address stored in a user's profile, used by the site to identify the user and send security emails.
- Endpoint: a specific address on a server that a web page or app talks to when it needs data or wants to change something.
- Group: a collection of user accounts that share access to something, with one or more admins.
- Invite feature: a product feature that lets an existing user ask another person to join a group, team or workspace.
- P1: a priority rating used by bug bounty programmes; on many programmes it is the highest severity level.
- Password reset flow: the process behind a "forgot my password" link, where the site emails a special link that lets the account owner set a new password.
- Pending reset: a password reset that has been started but not completed; the site is waiting for the new password to be submitted.
- Private programme: a bug bounty programme that only invited researchers can participate in.
- Redacted: removed or replaced, usually to hide names, addresses or other identifying details.
- Request body: the part of a web request that carries data, such as a form submission. The report does not include any request bodies.
- Reset token: the secret value embedded in a password reset link that proves the link is genuine and ties it to a particular reset request.
- Root cause: the underlying reason a bug exists, as opposed to its visible symptoms.
- State change: any modification of data stored on the server, such as adding a member, changing an email address or setting a new password.
- Technology stack: the combination of software, frameworks and services a website is built on.
- Victim: the person whose account is taken over, who in this case never interacts with the site during the attack.