0 Click Account Takeover Via reset password weird behavior
The password reset page stored the user's email in a local storage field called user_email, and the resend function used this field to determine the recipient instead of the email tied to the reset token. An attacker could change the local storage value to their own email and receive a reset link for the victim's account.
Snowman is Saying hi again with a new (weird) bug and a weird support team coz I had reported this bug in March 2023 because of the delay of the team I forgot about this bug totally, one week ago I was surprised when I found they responded about 3 months ago December 2023!
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 resend password reset endpoint trusted a client-controlled local storage value (user_email) to choose the recipient, instead of using the email bound to the server-side reset token.
Impact
An attacker could take over any account by receiving the victim's password reset link, provided they can modify local storage on the reset page (e.g., via their own browser session).
What the attacker needed
Victim's email address known; attacker can modify local storage on reset page
The fix
The resend function should derive the recipient email from the server-side reset token, not from a client-controlled local storage field.
How it was found
- Go to the reset password page and enter the victim's email address.
- After the first reset link is sent to the victim, open the browser console and change the user_email value in local storage to the attacker's email.
- Reload the page and use the resend email function.
- Open the attacker's email inbox and use the received link to reset the victim's password.
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 sends a reset link to your email. This site also saved your email address in a part of the browser called local storage, which any script on the page can change. The site then trusted that saved value when resending the link, so an attacker could swap in their own email and get the victim's reset link.
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.