The Removed Email That Led to a $500 Account Takeover
A removed email address remained eligible as a password-reset destination, so entering the current email sent a reset link to the old, removed address. An attacker who still controlled that removed email could reset the password and take over the account.
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
This write-up covers a flaw in the email management and password-reset functionality of a web application. The application lets a user hold more than one email address on an account: a primary address plus additional addresses that can be added and verified. The primary address can be changed, and addresses can be removed. Separately, the application offers a standard Forgot Password flow that takes an email address and sends a password-reset link.
The bug is that the password-reset flow kept trusting an email address that had already been removed from the account. The result was account takeover, and the report was rewarded with a $500 bounty.
Setup
The researcher created an account and worked with two addresses:
[redacted], the address used to create the account.[redacted], an address added and verified afterwards.
No tools, versions or special preconditions are described beyond the ability to register an account and control both mailboxes. The attacker needs to keep control of the address that is later removed, which is the whole point of the attack.
Finding it
The researcher was testing the email management and password-reset functionality together. The observation was that after an address had been removed from the account, the password-reset flow still treated it as a valid recovery destination. The old email was no longer associated with the account, yet it still received a valid reset link.
What makes this interesting is the mismatch: the reset was triggered with the current email, but the link went to the removed one. The removed address was never entered into the reset form.
Exploitation
Step 1: Create the account
The account is created with the first address:
[redacted]
Step 2: Add and verify a second address
The second address is added to the account and verified:
[redacted]
Step 3: Make the second address primary
The primary email is changed from [redacted] to [redacted].
Step 4: Remove the old address
[redacted] is removed from the account. At this point the old email is no longer associated with the account.
Step 5: Start a password reset
The researcher goes to Forgot Password and enters the current email:
[redacted]
Step 6: The link goes to the removed address
The password-reset link is sent to:
[redacted]
This is the core of the bug. The form was given the current address, but the application delivered the reset link to the address that had been removed. The researcher did not enter the removed email anywhere in the reset form.
Step 7: Take over the account
Because the researcher still controlled [redacted], the reset link could be opened and the account password changed. The report records the verification as:
Old Password → Invalid login credentialsNew Password → Login successful
That is, the old password no longer worked and the new one did, confirming that the reset link could actually change the account password. This is the account takeover.
Attack flow
The report summarises the chain as:
Create Account ↓Add & Verify Secondary Email ↓Make Secondary Email Primary ↓Remove Old Email ↓Forgot Password ↓Enter Current Email ↓Reset Link Sent to Removed Email ↓Change Password ↓Account Takeover
Root cause
The report describes the issue as an inconsistency between email management and password recovery. The application considered the old email removed:
[redacted] → Removed ❌
But the password-reset functionality still treated it as a valid recovery destination:
[redacted] ↓Password Reset ↓[redacted]
In other words, removing the email did not completely revoke its role in the recovery process. The report does not show the code or the exact lookup, so the precise mechanism is not stated. The report does not show the code or the exact lookup, so the precise mechanism is not stated; the inconsistency between the two workflows is what it documents.
Impact
An attacker who still controls a previously associated email address could, according to the report:
- Reset the account password
- Gain unauthorised access
- Modify account information
- Potentially lock out the legitimate user
The condition is that the attacker must control an address that was once on the account and has since been removed. In the demonstrated case that was the address used to create the account. The report hedges the lockout point with "potentially".
Fix
The report recommends that password-reset links should only be sent to currently authorised and verified email addresses. The application should:
- Remove deleted emails from password-recovery eligibility.
- Verify the current email-to-account relationship before generating reset tokens.
- Never use historical email addresses for password recovery.
- Invalidate recovery tokens when an email is removed.
- Add regression tests for email changes and removals.
Variants to test
When testing account-management features, the report suggests checking how changes propagate through email management, email verification, password reset, account recovery and authentication. Concrete things to try on other targets:
- Remove an address, then reset with the current one. If the reset link arrives at the removed address, the same bug is present. A positive result is a valid reset link delivered to a mailbox that is no longer on the account.
- Change the primary address, then reset. Check whether the link goes to the new primary or to the old one. A link to the old address is a positive result.
- Reset with the removed address directly. Enter the removed address in the Forgot Password form. If the application accepts it and sends a link, recovery eligibility was not revoked.
- Reuse an old reset token after removing the address. Request a reset, then remove the address, then use the token. If the token still works, invalidation on removal is missing.
- Check other recovery channels. Look at whether the same stale-address behaviour appears in account recovery questions, magic links or two-factor reset flows, not just password reset.
Each of these is a way to check whether removing an authentication factor from one part of the application actually revokes it everywhere it can be used.
What happened, in plain words
A security researcher was testing a website that lets you keep more than one email address on a single account. You have one main address (the "primary" one) and you can add extra addresses to the same account. You can also change which address is the primary one, and you can remove addresses you no longer want.
The website also has the usual Forgot Password button. You type your email address, the site sends a link to that address, you click the link, and you set a new password. This is how almost every website lets you back into your account when you forget your password.
The researcher found that these two features did not agree with each other. After an email address had been removed from the account, the password-reset feature still treated that removed address as a valid place to send a reset link. So the researcher could ask for a reset using the current email address, and the link would arrive at the old, removed address instead. Because the researcher still controlled that old mailbox, they could open the link and change the account password. That is called account takeover: someone else ends up in control of your account.
The researcher reported it, and the company paid a $500 bounty. A bounty is a reward a company pays to someone who finds and reports a security problem instead of abusing it.

The image sits right after the introduction, where the researcher sums up the finding: a removed email address could still receive a valid password-reset link, the flaw led to account takeover, and it earned a $500 bounty.
The pieces you need to understand first
Before walking through the steps, here are the ideas the rest of the article relies on. None of them require any special software; they are all things you meet every day when using a browser.
- Account: your personal space on a website, protected by a username or email address and a password.
- Email address on an account: many sites let you attach several addresses to one account. One is the primary address, the one the site treats as your main contact. The others are extra addresses you can add and verify.
- Verification: proving that you really own an email address. The site sends a message to that address with a link or a code, and you click or type it. Only someone who can open that mailbox can complete the step.
- Forgot Password flow: the sequence where you type your email, the site emails you a special link, and opening the link lets you set a new password. The link usually contains a long random string called a token, which is like a temporary key that proves the request came from the real mailbox owner.
- Token: a long, hard-to-guess string that stands in for proof of identity for a short time. Think of a cloakroom ticket: whoever holds the ticket gets the coat, and the ticket stops working after a while or once it is used.
- Session: the state of being logged in. After you sign in, the site remembers you, usually by storing a small piece of data in your browser called a cookie. A cookie is like a wristband at an event: the staff check it instead of asking for your ID at every door.
- API: the part of a website that the browser talks to behind the scenes. When you click a button, your browser sends a request to the site's API and the API sends back an answer. You never see it directly, but it is what actually does the work.
- Account takeover (ATO): when an attacker gains control of someone else's account, for example by changing its password.
- Authentication factor: anything used to prove who you are, such as a password, an email address that receives reset links, or a phone number that receives codes. Removing one should mean it can no longer be used to get in.
What the researcher was testing
The target was a web application with two features that touch the same account:
- Email management: add an address, verify it, make it primary, remove an address.
- Password reset: the Forgot Password form, which takes an email address and sends a reset link.
The researcher tested them together, which is the key idea. Each feature may look fine on its own; the bug appears in how they interact.
Setting up
The researcher created an account and used two addresses:
[redacted], the address used to create the account.[redacted], an address added and verified afterwards.
No special tools, software versions or preconditions are described beyond being able to register an account and read both mailboxes. The one requirement that matters is that the attacker keeps control of the address that is later removed. That is the whole point: the attack only works if the attacker can still open the mailbox of the removed address.
Finding the bug
The researcher was testing email management and password reset side by side. The observation was simple: after an address had been removed from the account, the password-reset flow still treated it as a valid recovery destination. The old email was no longer associated with the account, yet it still received a valid reset link.
What makes this interesting is the mismatch. The reset was triggered with the current email, but the link went to the removed one. The removed address was never typed into the reset form.
Walking through the attack
Step 1: Create the account
The account is created with the first address:
[redacted]
This is the address the researcher controls and will later remove.
Step 2: Add and verify a second address
The second address is added to the account and verified:
[redacted]
Verification matters because it proves the researcher can read mail sent to this address too.
Step 3: Make the second address primary
The primary email is changed from [redacted] to [redacted].
This step is what makes the later test meaningful. The account's main address is now the second one, so that is the address a user would naturally type into the Forgot Password form.
Step 4: Remove the old address
[redacted] is removed from the account. At this point the old email is no longer associated with the account.
Step 5: Start a password reset
The researcher goes to Forgot Password and enters the current email:
[redacted]
This is exactly what a normal user would do. They type the address that is currently on the account.
Step 6: The link goes to the removed address
The password-reset link is sent to:
[redacted]
This is the core of the bug. The form was given the current address, but the application delivered the reset link to the address that had been removed. The researcher did not enter the removed email anywhere in the reset form.
In everyday terms: you tell the front desk your current address, and they post the key to your old flat, which you no longer rent but still have a key to.
Step 7: Take over the account
Because the researcher still controlled [redacted], the reset link could be opened and the account password changed. The report records the verification as:
Old Password → Invalid login credentialsNew Password → Login successful
Read line by line, this says two things. First, trying to log in with the old password now fails with "invalid login credentials", meaning the old password no longer works. Second, logging in with the new password succeeds. Together they confirm that the reset link really did change the account password, not just send an email. That is the account takeover.
The attack flow at a glance
The report summarises the chain as:
Create Account ↓Add & Verify Secondary Email ↓Make Secondary Email Primary ↓Remove Old Email ↓Forgot Password ↓Enter Current Email ↓Reset Link Sent to Removed Email ↓Change Password ↓Account Takeover
Each arrow is one step in the sequence. You start by creating an account, add and verify a second address, promote that second address to primary, remove the original address, use Forgot Password with the current address, and the reset link lands in the removed mailbox. Opening it lets you set a new password, and the account is taken over.
Why it happened
The report describes the issue as an inconsistency between email management and password recovery. The application considered the old email removed:
[redacted] → Removed ❌
But the password-reset functionality still treated it as a valid recovery destination:
[redacted] ↓Password Reset ↓[redacted]
In other words, removing the email did not completely revoke its role in the recovery process. The report does not show the code or the exact lookup, so the precise mechanism is not stated. The report does not show the code or the exact lookup, so the precise mechanism is not stated; what it documents is the inconsistency between the two workflows.
A useful comparison is a building with two separate lists at reception. One list says who lives in the flat; the other says who gets a spare key. Deleting a name from the first list does not automatically delete it from the second, and the key still goes out.
Impact
An attacker who still controls a previously associated email address could, according to the report:
- Reset the account password
- Gain unauthorised access
- Modify account information
- Potentially lock out the legitimate user
The condition is that the attacker must control an address that was once on the account and has since been removed. In the demonstrated case that was the address used to create the account. The report hedges the lockout point with "potentially".
How to fix it
The report recommends that password-reset links should only be sent to currently authorised and verified email addresses. The application should:
- Remove deleted emails from password-recovery eligibility.
- Verify the current email-to-account relationship before generating reset tokens.
- Never use historical email addresses for password recovery.
- Invalidate recovery tokens when an email is removed.
- Add regression tests for email changes and removals.
In plain terms: when an address is removed, it should be struck off every list that can be used to recover the account, not just the list shown on the profile page. Any reset link already issued to it should stop working. And automated tests should check that changing or removing an address does not leave a back door open.
Other things to try on different sites
When testing account-management features, the report suggests checking how changes propagate through email management, email verification, password reset, account recovery and authentication. Concrete things to try on other targets:
- Remove an address, then reset with the current one. If the reset link arrives at the removed address, the same bug is present. A positive result is a valid reset link delivered to a mailbox that is no longer on the account.
- Change the primary address, then reset. Check whether the link goes to the new primary or to the old one. A link to the old address is a positive result.
- Reset with the removed address directly. Enter the removed address in the Forgot Password form. If the application accepts it and sends a link, recovery eligibility was not revoked.
- Reuse an old reset token after removing the address. Request a reset, then remove the address, then use the token. If the token still works, invalidation on removal is missing.
- Check other recovery channels. Look at whether the same stale-address behaviour appears in account recovery questions, magic links or two-factor reset flows, not just password reset.
Each of these is a way to check whether removing an authentication factor from one part of the application actually revokes it everywhere it can be used.
Glossary
- Account: your personal space on a website, protected by a login and password.
- API: the part of a website that the browser talks to behind the scenes to fetch and change data.
- Authentication factor: anything used to prove who you are, such as a password or an email address that receives reset links.
- Bounty: a reward a company pays to someone who reports a security problem responsibly.
- Cookie: a small piece of data a site stores in your browser so it can remember you between page loads.
- Email management: the feature that lets you add, verify, change and remove email addresses on an account.
- Forgot Password flow: the sequence where you enter your email, receive a reset link, and set a new password.
- Primary email: the main email address the site treats as your contact address on the account.
- Regression test: an automated test that checks a fixed bug stays fixed and that related features keep working.
- Reset link: the special link emailed to you that lets you set a new password.
- Session: the state of being logged in, usually kept alive by a cookie.
- Token: a long, hard-to-guess string that acts as temporary proof of identity, such as the code inside a reset link.
- Verification: proving you own an email address by completing a step sent to that mailbox.
- Vulnerability: a weakness in a website that someone could abuse to do something the owner did not intend.