Skip to content
Account takeover Write-up Intermediate

How an Unverified Email Change Led to Full Account Takeover | $$$$ Bounty

A company administrator could change another user's email address without verification, and the password-reset system trusted that unverified address. This allowed the administrator to reset the victim's password and take over their account.

Marwanmedhat Follow

Published on medium.com

Bug Bounty

Marwanmedhat, 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.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 5 min read.

Context

This write-up describes an account takeover found during a private bug bounty program. The target's identity and sensitive technical details are withheld, so the application is referred to only as a company-facing web application with a Company Users feature.

That feature lets users with administrative privileges manage other accounts inside their own organisation. A Company Administrator can modify another user's information, including the registered email address. The question the researcher asked was simple: if an administrator changes another user's email to one they control, does the application require verification before trusting that address?

From the original on medium.com

The report was accepted, rewarded with a bounty, and later marked as resolved.

Setup

The setup needed for the test was:

  1. A Company Administrator account on the target application.
  2. A second, controlled test account inside the same company, to act as the victim.
  3. An email address controlled by the researcher, to receive whatever the application sends.

The report describes the work through the Company Users section, the Forgot Password form and the login page.

Finding it

While exploring the application, the researcher came across the Company Users feature and noted that a Company Administrator could change another user's registered email address. That raised the question of whether the application would verify the new address before trusting it, or whether it would accept it straight away and later use it for security-sensitive flows such as password recovery.

The concern is a design one rather than a parsing or injection bug: managing another user's company profile is an administrative action, but the email address is also the identity used for authentication and recovery. If the two are the same field and the change is unverified, an administrator may be able to cross from profile management into control of the victim's credentials.

Exploitation

Step 1: Changing the target user's email

The researcher logged in with the Company Administrator account and navigated to the Company Users section. Selecting another controlled test account, the administrator changed its registered email address to an address the researcher owned.

The application accepted the change immediately. No email verification or confirmation from the account owner was required, and the updated address was saved directly to the target user's profile.

From the original on medium.com

At this point the behaviour looked like a missing email-verification issue. The important open question was whether the updated address would also be trusted by the application's authentication mechanisms, in particular password reset.

Step 2: Chaining the issue with password reset

The researcher logged out and went to the Forgot Password functionality, entered the target account's username and submitted a password-reset request.

Shortly afterwards a password-reset email arrived in the controlled inbox. The application had sent the target user's password-reset link to the unverified address that had just been configured.

From the original on medium.com

The issue was no longer limited to changing another user's contact information: the application was treating the unverified address as an authorised password-recovery destination.

Step 3: Confirming the account takeover

The researcher opened the password-reset link, set a new password, and returned to the login page. Using the target account's username and the new password, authentication succeeded.

From the original on medium.com

The account takeover was confirmed. The researcher now had access to the target account and its assigned permissions without knowing its original password. The full chain was:

Company Administrator → Unverified Email Change → Password Reset → Account Takeover

Additional findings

Two further behaviours were noticed during the investigation.

  1. Multiple accounts sharing the same email. The application allowed different user accounts to share the same primary email address, and password-reset requests for that address could generate recovery emails associated with different accounts.
  2. Other functionalities trusting unverified emails. The Customer Feedback feature also relied on the email address stored in account settings for confirmation and follow-up, even when that address had not been verified.
From the original on medium.com

These observations showed that the problem extended beyond a single feature.

Root cause

The underlying issue is a business logic flaw spanning account management and password recovery. The application allowed a privileged company user to modify another user's email address without verifying ownership of the replacement address. The password-reset mechanism then trusted that address, which let the administrator take control of the target user's authentication credentials.

The email address served both as a company profile attribute and as the identity used for authentication and recovery. Managing another user's company profile should not grant control over their personal authentication identity. The report does not describe the code or the specific checks that were missing, so the exact implementation gap is not stated.

Impact

Exploitation required company-management privileges, and the report is explicit about that limit. Within that condition, the confirmed impact was account takeover: access to the affected user's account, its assigned permissions and its account-specific functionality, without knowledge of the original password.

The additional findings widen the surface. Shared primary email addresses mean password-reset requests for one address can produce recovery emails tied to different accounts, and the Customer Feedback feature trusted unverified addresses for confirmation and follow-up. The report does not quantify how many accounts or features were affected.

Fix

The report says the security team accepted the finding, awarded a bounty and marked the issue as resolved. It does not describe the remediation that was applied.

Based on the root cause, the changes that would address it are: require verification of a new email address before it is stored as trusted, and in particular before it can receive password-reset links; notify the account owner of any change to their address; and make every feature that sends mail to the stored address, including Customer Feedback, check verification status first. The shared-email behaviour also needs a decision, either rejecting duplicate primary addresses or making recovery unambiguous when several accounts share one.

Variants to test

  1. Administrator-driven email change on other multi-tenant apps. Look for any admin or team-management screen that edits another member's email. A positive result is the change being saved with no verification of the new address.
  2. Password reset straight after the change. Request a reset for the victim's username and watch the controlled inbox. A reset link arriving at the unverified address confirms the chain.
  3. Other flows that trust the stored address. Check feedback forms, notifications, invitations and support follow-ups. A positive result is any of them sending to or acting on an address that was never verified.
  4. Duplicate primary emails. Register or configure two accounts with the same primary address and trigger recovery for it. A positive result is recovery emails for different accounts arriving at that address, or a reset link that lands on the wrong account.
  5. Change without owner notification. After an administrator edits an address, check whether the original owner receives any alert. Check whether the original owner receives any alert about the change.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 10 min read.

What happened, in plain words

A security researcher found a way to take over another person's account on a company web application. He did not guess a password and he did not break any encryption. Instead, he used two ordinary features that were each working as designed, but which trusted each other too much.

The first feature lets a company administrator edit the details of other users in the same company, including their email address. The application saved a new email address immediately, without asking the owner of that address to confirm it. The second feature is the "forgot password" flow, which sends a reset link to the email address on file. Because the application trusted the unverified address, the reset link went to an inbox the researcher controlled. He used it to set a new password and log in as the victim.

The report was submitted through a private bug bounty program, accepted, rewarded with a bounty, and later marked as resolved. The company's identity and sensitive technical details are withheld.

From the original on medium.com

A few terms before we start, because they come up constantly:

  • An account is your personal space on a website: your profile, your settings, your permissions.
  • Authentication is the process of proving who you are, usually with a username and password. Authorisation is what you are then allowed to do.
  • An email address on file is the address the website stores for you. It is used to contact you, and very often to recover your account if you forget your password.
  • Verification of an email address means proving that you actually control that inbox, typically by clicking a link the site sends there.
  • Account takeover (ATO) is when someone else gains access to your account without your permission.
  • A bug bounty program is a scheme where a company pays researchers for reporting security problems responsibly instead of exploiting them. A private program means only invited researchers can take part.

Context

The target is a company-facing web application. That means it is built for organisations: one company signs up, and many people from that company get accounts inside it. The report refers to a Company Users feature, which lets users with administrative privileges manage other accounts inside their own organisation.

Think of it like an office building. The company administrator is the person at the front desk who can update the staff directory: names, phone numbers, desk numbers. That is a normal, useful job. The question the researcher asked was whether that directory power accidentally extends to something much more sensitive: the keys to each person's front door.

Specifically, a Company Administrator could modify another user's information, including the registered email address. The researcher's question was simple: if an administrator changes another user's email to one they control, does the application require verification before trusting that address?

That question matters because the email address is not just a contact detail. On most websites it is also the recovery channel: the place a password-reset link is sent. If an administrator can point that channel at their own inbox, they may be able to reset the victim's password.

Setup

The setup needed for the test was:

  1. A Company Administrator account on the target application.
  2. A second, controlled test account inside the same company, to act as the victim.
  3. An email address controlled by the researcher, to receive whatever the application sends.

The report describes the work through the Company Users section, the Forgot Password form and the login page. You do not need to write code or install anything to follow the logic.

Finding it

While exploring the application, the researcher came across the Company Users feature and noted that a Company Administrator could change another user's registered email address. That raised the question of whether the application would verify the new address before trusting it, or whether it would accept it straight away and later use it for security-sensitive flows such as password recovery.

This is a business logic flaw, not a technical crash or injection bug. Business logic means the rules the application follows about who may do what, in what order, and under which conditions. The code can be perfectly written and still have a logic flaw, in the same way a shop can have a flawless till but a refund policy that lets anyone refund anything.

The concern is a design one. Managing another user's company profile is an administrative action. But the email address is also the identity used for authentication and recovery. If the two are the same field and the change is unverified, an administrator may be able to cross from profile management into control of the victim's credentials.

Exploitation

Step 1: Changing the target user's email

The researcher logged in with the Company Administrator account and navigated to the Company Users section. Selecting another controlled test account, the administrator changed its registered email address to an address the researcher owned.

The application accepted the change immediately. No email verification or confirmation from the account owner was required, and the updated address was saved directly to the target user's profile.

From the original on medium.com

At this point the behaviour looked like a missing email-verification issue. The important open question was whether the updated address would also be trusted by the application's authentication mechanisms, in particular password reset. A missing verification step on its own is a weakness, but it becomes far more serious when another feature relies on the unverified value.

Step 2: Chaining the issue with password reset

The researcher logged out and went to the Forgot Password functionality, entered the target account's username and submitted a password-reset request.

Shortly afterwards a password-reset email arrived in the controlled inbox. The application had sent the target user's password-reset link to the unverified address that had just been configured.

From the original on medium.com

This is the moment the two features connect. The first feature wrote an unverified value into the victim's profile. The second feature read that value and treated it as an authorised destination for a password-reset link. Neither feature is broken on its own; the problem is the trust between them. The issue was no longer limited to changing another user's contact information: the application was treating the unverified address as an authorised password-recovery destination.

Step 3: Confirming the account takeover

The researcher opened the password-reset link, set a new password, and returned to the login page. Using the target account's username and the new password, authentication succeeded.

From the original on medium.com

The account takeover was confirmed. The researcher now had access to the target account and its assigned permissions without knowing its original password. The full chain was:

Company Administrator → Unverified Email Change → Password Reset → Account Takeover

Read that chain as a sentence: because an administrator could change an email without verification, and because password reset trusted that email, the administrator could take over the account. Each arrow is a step that depends on the one before it.

Additional findings

Two further behaviours were noticed during the investigation.

  1. Multiple accounts sharing the same email. The application allowed different user accounts to share the same primary email address, and password-reset requests for that address could generate recovery emails associated with different accounts. Imagine two people with the same postal address both asking for a replacement key: the building has no reliable way to know which key belongs to which person.
  2. Other functionalities trusting unverified emails. The Customer Feedback feature also relied on the email address stored in account settings for confirmation and follow-up, even when that address had not been verified.
From the original on medium.com

These observations showed that the problem extended beyond a single feature. The unverified email was being trusted in several places, not just in password recovery.

Root cause

The underlying issue is a business logic flaw spanning account management and password recovery. The application allowed a privileged company user to modify another user's email address without verifying ownership of the replacement address. The password-reset mechanism then trusted that address, which let the administrator take control of the target user's authentication credentials.

The email address served both as a company profile attribute and as the identity used for authentication and recovery. Managing another user's company profile should not grant control over their personal authentication identity. The report does not describe the code or the specific checks that were missing, so the exact implementation gap is not stated.

A useful comparison is a hotel. The front desk can update your room number in the guest list. That is administration. But if the front desk can also change which key opens your safe, then updating the guest list is no longer a harmless administrative act.

Impact

Exploitation required company-management privileges, and the report is explicit about that limit. Within that condition, the confirmed impact was account takeover: access to the affected user's account, its assigned permissions and its account-specific functionality, without knowledge of the original password.

The additional findings widen the surface. Shared primary email addresses mean password-reset requests for one address can produce recovery emails tied to different accounts, and the Customer Feedback feature trusted unverified addresses for confirmation and follow-up. The report does not quantify how many accounts or features were affected.

Fix

The report says the security team accepted the finding, awarded a bounty and marked the issue as resolved. It does not describe the remediation that was applied.

Based on the root cause, the changes that would address it are: require verification of a new email address before it is stored as trusted, and in particular before it can receive password-reset links; notify the account owner of any change to their address; and make every feature that sends mail to the stored address, including Customer Feedback, check verification status first. The shared-email behaviour also needs a decision, either rejecting duplicate primary addresses or making recovery unambiguous when several accounts share one.

Variants to test

If you want to look for the same pattern elsewhere, here are starting points. Remember that testing should only be done on systems you are authorised to test, such as a bug bounty program's in-scope targets.

  1. Administrator-driven email change on other multi-tenant apps. Look for any admin or team-management screen that edits another member's email. A positive result is the change being saved with no verification of the new address.
  2. Password reset straight after the change. Request a reset for the victim's username and watch the controlled inbox. A reset link arriving at the unverified address confirms the chain.
  3. Other flows that trust the stored address. Check feedback forms, notifications, invitations and support follow-ups. A positive result is any of them sending to or acting on an address that was never verified.
  4. Duplicate primary emails. Register or configure two accounts with the same primary address and trigger recovery for it. A positive result is recovery emails for different accounts arriving at that address, or a reset link that lands on the wrong account.
  5. Change without owner notification. After an administrator edits an address, check whether the original owner receives any alert. Check whether the original owner receives any alert about the change.

Glossary

  • Account: a person's individual space on a website, holding their profile, settings and permissions.
  • Account takeover (ATO): gaining access to someone else's account without their permission.
  • Administrator: a user with extra privileges to manage other users or settings.
  • Authentication: proving who you are, usually with a username and password.
  • Authorisation: what an authenticated user is allowed to do.
  • Bug bounty program: a scheme where a company pays researchers for reporting security problems responsibly. A private program is open only to invited researchers.
  • Business logic flaw: a weakness in the rules an application follows about who may do what, rather than in its code or parsing.
  • Company Administrator: in this report, a user with administrative privileges over other accounts inside their own organisation.
  • Company Users: the feature that lets a Company Administrator manage other accounts in the organisation.
  • Credentials: the information used to log in, such as a username and password.
  • Customer Feedback: a feature mentioned in the report that used the stored email address for confirmation and follow-up.
  • Email verification: proving that you control an email inbox, usually by clicking a link sent to it.
  • Forgot Password: the feature that sends a password-reset link to the email address on file.
  • Multi-tenant application: an application where many separate organisations share the same system, each with its own users and data.
  • Password reset: the process of setting a new password, usually via a link sent by email.
  • Permissions: the specific actions an account is allowed to perform.
  • Primary email address: the main email address stored on an account.
  • Privileges: rights granted to an account, such as the ability to manage other users.
  • Recovery channel: the route used to regain access to an account, commonly the email address on file.
  • Remediation: the fix applied to close a security issue.
  • Resolved: the status a reported issue receives once the company considers it fixed.
  • Root cause: the underlying reason a vulnerability exists.
  • Username: the name that identifies an account at login.

More by Marwanmedhat

View all

1 more disclosed report, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Account takeover

The lesson behind this report.

Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.