The Dumbest Bug I Ever Found (And Why Complexity Is Overrated)
A password reset link included an email parameter that the server trusted without verifying it matched the token, allowing an attacker to reset another user's password by changing the email value. The author also describes an open redirect found by changing a redirect parameter to an external site.
Published on medium.com
I spent three hours testing a site once. Real deep dive.
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 bind the reset token to the email address, trusting the email parameter from the URL instead.
Impact
An attacker could take over any account by resetting its password, as demonstrated by the author.
What the attacker needed
A free account; victim's email address known
The fix
The reset token should be tied to the email address on the server side, so changing the email parameter does not affect whose password is reset.
How it was found
- Request a password reset for your own account and receive the reset link by email.
- Examine the reset link and notice it contains both a token and an email parameter.
- Change the email parameter to the victim's email address while keeping your own token.
- Submit the modified 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 reset a password, the site emails you a special link with a secret code (token) that proves it's you. Here, the link also contained your email address, and the site believed whatever email was in the link instead of checking it against the secret code. So someone could swap in a different email and reset that person's password.
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.