Broken authentication and invalidated email address leads to account takeover
A password reset link sent to an old email address remained valid after the account's email address was changed, allowing anyone with access to that old email to reset the password and take over the account.
- Disclosed after 4 months
Hi, team. I found a bug in twitter.com Description and POC:
- Create a twitter account having email address "[email protected]".
- Now Logout and ask for password reset link. Don't use the password reset link.
- Login using the same password back and update your email address to "[email protected]" and verify the same.
- Now logout and use the password reset link which was mailed to "[email protected]" in step 2.
- You can see that it is possible to change the password.
Here the password reset link of "[email protected]" which was old email address associated with twitter can be use to change the password of twitter account having updated email address "[email protected]".
Attack scenario: If victim's previous "[email protected]" account was compromised, he decided to updated his twitter email address to "[email protected]" but before updating by mistake he asked for password reset link. As a result his twitter account will be compromised by the attacker.
Fix: As soon as new email address is updated all the previous links should also get expired.
If you want further information please let me know.
Thanks and regards. Mohd Haji
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 the password reset token was not invalidated when the account's email address was changed.
Impact
If an attacker controls or can read the victim's old email inbox, they could use the still-valid reset link to change the password and take over the account.
What the attacker needed
Attacker can access the victim's old email inbox; victim requested a reset link before changing email
How it was found
- Create an account with an email address.
- Log out and request a password reset link, but do not use it.
- Log back in and change the email address to a new one, then verify it.
- Log out and use the earlier reset link sent to the old address.
- Observe that the password can still be changed.
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 forget your password, a website emails you a special link to set a new one. This report shows that if you later change the email address on your account, an old reset link sent to the previous address still works. So if someone else can read that old email inbox, they can use the link to change your password and get into your 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.