Email Takeover leads to permanent account deletion
The change email functionality lacked proper authentication, allowing an attacker to change their email to a victim's existing email. This caused the victim's account to become inaccessible and their email to be deleted from the database, enabling permanent account deletion.
Originally disclosed on HackerOne
- Triaged in 48 hours
- Fixed in 6 days
- Disclosed after 13 days
Hii Triager,
NOTE: Just to clarify, I reported a similar issue yesterday, but it was on a different endpoint. In this report, the vulnerable domain is the same, but the endpoint is different.
I found that an attacker can change their email address to the victim's(existing user) email, which then leads to permanent account deletion of the victim's account.
User-A: Attacker User-B: Victim
Both User-A & User-B are registered user & have their separate accounts on https://www.██████████/852585B6003EBA25/CreateAccount.html
Impact
- Possible Account Takeover (Probably)
- Permanent Account Deletion
- Improper Authentication on change email functionality.
System Host(s)
www.█████████
Affected Product(s) and Version(s)
CVE Numbers
Steps to Reproduce
1 - Login to Attacker's account, User-A ([email protected])
2 - Login to Victim's Account, User-B ([email protected])
3 - In the Attacker's account, Navigate to the Change Your Email Address section.
4- Change the Attacker's email to [email protected]. You can successfully take over the victim's email. (probably victim account)
5 - Now, Try to login as victim account(with victim email & password) , Application will Return Invalid Credentials
- This is the indication of an Email Takeover of the victim's account
6 - Now, Navigate to the Attacker's account & change the email back to [email protected]
7 - Navigate to the Registration page, Enter the victim's email [email protected] & click Check Availability. You'll see that the victim's email is deleted from the DB & available for a new account.
- This is the indication of **Permanent deletion of the Victim's account. **
Video PoC
████
Suggested Mitigation/Remediation Actions
- Set proper authentication on the Update Profile functionality.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely missing authentication and uniqueness checks on the change email endpoint, allowing an attacker to set their email to an existing user's email.
Impact
An attacker could take over the victim's email and cause permanent deletion of the victim's account, though account takeover is stated as probable.
What the attacker needed
Attacker has an account; victim has an account
The fix
The change email functionality should enforce proper authentication and check that the new email is not already in use.
How it was found
- Log in to the attacker's account.
- Log in to the victim's account.
- In the attacker's account, go to the change email section.
- Change the attacker's email to the victim's email.
- Try to log in as the victim; the application returns invalid credentials.
- Change the attacker's email back, then check the victim's email on the registration page; it is available, indicating deletion.
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 report has not been written yet. The Original tab links to the source.
When you change your email on a website, the site should check that the new email isn't already used by someone else. Here, it didn't, so an attacker could set their email to the victim's email. This made the victim unable to log in and removed their email from the system, effectively deleting their 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.