How I Discovered an Email Change Vulnerability Leading to Pre-Account Takeover | p2
The email change confirmation link accepted a modified email parameter as long as the token was valid, so an attacker could set a victim's account email to their own address. This could lead to account takeover by receiving password reset emails.
Published on medium.com
I’m Dhananjay Pathak, a passionate security researcher, and I’m excited to share my recent discovery of an email change vulnerability that could lead to a pre-account takeover. In this post, I’ll walk you through how I uncovered a simple flaw in the email change process, which allows attackers to take control of a…
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.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the server validated the token but did not bind it to the specific email address it was issued for, allowing the email parameter to be changed freely.
Impact
This could lead to account takeover by redirecting password reset emails or other account notifications to an attacker-controlled email address.
What the attacker needed
Victim has an account; attacker can obtain a valid token for their own email change; attacker can intercept and modify the request
How it was found
- Enumerate subdomains of the target and identify live ones with registration and login features.
- Request an email change and receive a confirmation link containing an email parameter and a token parameter.
- Intercept the request and modify the email parameter to an arbitrary email address.
- Send the modified request with the original valid token; the server accepts it and changes the account email.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
When you change your email address on a website, the site usually sends a confirmation link to make sure the new address belongs to you. Here, the link contained both the new email address and a secret code (token). The site checked the code but did not check that the email address in the link matched the one the user originally requested, so an attacker could swap in their own email address and take over the account.
What is Account takeover?
Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.