How I Uncovered an Account Takeover Flaw via Unexpired Reset Toke
Password reset tokens remained valid after the account's email address and password were changed. An attacker who held an old reset link could regain access to the account even after the user updated their credentials.
Published on medium.com
Why invalidating state-changing tokens on profile updates matters more than you think
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 did not invalidate existing password reset tokens when the account's email address or password was changed.
Impact
An attacker who holds an old reset link could regain access to the account even after the user changed their email and password.
What the attacker needed
Attacker holds an old reset link; victim changes email or password
The fix
The server should invalidate all existing password reset tokens whenever the account's email address or password is changed.
How it was found
- Create and verify an account, then log out.
- Request a password reset and save the reset link without using it.
- Log in, change the email address, and verify the new email.
- Change the account password while logged in, then log out.
- Open the old reset link and submit a new password; the server accepts it.
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 forget your password, a website emails you a special link to reset it. This report found that the link still worked even after the user changed their email and password, so anyone who still had the old link could 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.