From Zero to $8,500: Exploiting a Flawed Reset Token Validation t
A password reset endpoint compared the supplied token loosely against a database value, so sending an array containing zero matched a user whose reset token was unset and reset that account's password. The response also skipped the MFA step, letting the attacker obtain a full session for the first record in the table, said to be the administrator.
It was late on a Friday night, and I was deep-diving into a private bug bounty program for a major B2B SaaS platform. Let’s call the target securecorp.io.
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 a loose equality comparison in the reset-token check combined with a fallback path that skipped MFA when the token matched an unset database value.
Impact
The attacker could reset another user's password and receive a fully privileged session without passing MFA; the report says the affected account was the primary administrator.
What the attacker needed
Access to the reset confirmation endpoint; no victim interaction
The fix
The team was said to have deployed a hotfix using strict equality checks and a schema validator that requires the token to be an alphanumeric string.
How it was found
- Request a password reset for your own account and capture the confirmation request.
- Send the confirmation request to Repeater and replace the token with an empty string; the server returns an invalid-token error.
- Replace the token with a boolean true; the server returns a 500 error, hinting at weak input handling.
- Replace the token with an array containing zero; the server returns success for a different user and a full session token.
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 checks a secret code (token) to make sure the request is genuine. Here the check was too loose: it compared different kinds of data in a way that treated an odd value as matching an account with no reset code set. That let the attacker change someone else's password and get logged in without the usual second step (MFA, a one-time code from an app).
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.