Bypassing Two-Factor Authentication via Password Reset Functional
The application enforced two-factor authentication only during login, but not after a password reset, so an attacker who could reset the password was logged in without a 2FA challenge. This allowed full account takeover even when 2FA was enabled.
Published on 19whoami19.medium.com
Two-Factor Authentication (2FA) is widely adopted as an additional security layer to protect user accounts. However, a misimplementation of auxiliary authentication flows — such as password reset — can completely nullify its effectiveness.
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 application treated password reset as a trusted action and issued an authenticated session without revalidating the second factor.
Impact
An attacker could gain full access to user accounts, potentially leading to data exposure, privilege escalation, financial fraud, and compliance violations.
What the attacker needed
Attacker has access to victim's email; Victim has 2FA enabled
The fix
The issue was fixed; the fix should ensure 2FA is validated on all authentication state changes, including after a password reset.
How it was found
- Attacker initiates a password reset request.
- Victim receives a reset link (or attacker accesses it).
- Attacker sets a new password.
- Application automatically authenticates the user.
- No 2FA prompt is triggered.
- Attacker gains full account access.
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.
Two-factor authentication (2FA) is a second proof of identity, like a code from your phone, asked for at login. Here, the site asked for that code only at login, but not after someone reset the password. So if an attacker could reset the password, they got straight into the account without ever needing the second factor.
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.