“Forgot Password?” Forgotten feature
The password reset flow accepted an email parameter after the reset link was clicked, so an attacker could change it to any account and set that user's password. Reset links also stayed valid for hours, allowing replay.
medium.com
Published on medium.com
During my SIWES program, I was testing the password reset functionality of a web app. Everything looked normal enter your email, get a reset link, click it, and set a new password.
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 reset endpoint trusted a user-supplied email parameter instead of binding the reset token to a single account, and tokens had no short expiry.
Impact
An attacker could take over any user's account and reuse stale reset links, leading to data compromise.
What the attacker needed
A valid password reset link; ability to intercept and modify requests
The fix
The reset link should be bound to one user via a secure token, expire within minutes, and not ask for the email again.
How it was found
- Request a password reset for your own account and receive the reset link.
- Click the reset link; the app asks for the email again.
- Intercept the request and change the email parameter to another user's address.
- Submit the request to set a new password for that account.
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 a password, a site emails you a special link to set a new one. This site asked for your email again after you clicked the link, and trusted whatever email was sent. By changing that email to someone else's, an attacker could take over their account. The links also did not expire quickly, so an old link could be reused.
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.