Bypassing Two-Factor Authentication via Account Deactivation and Password Reset
After deactivating an account, a user can reset the password and log in without being prompted for two-factor authentication. An attacker with access to the victim's email could deactivate the account, reset the password, and gain full access without passing 2FA.
Originally disclosed on HackerOne
- Disclosed after 32 days
Summary:
The vulnerability arises from a logical flaw in the account recovery and 2FA enforcement processes. Specifically, after deactivating an account, users can reset their password and log in without being prompted for 2FA. The 2FA mechanism, which is designed to provide an additional layer of security, is effectively bypassed.
Steps To Reproduce
- Go to settings enable 2fa and click on Deactivation
- After Deactivation your account go to reset password and reset your password
- After change your password you can notice access account without 2fa
poc ███
Recommendations
Disable Password Resets for Deactivated Accounts: Ensure that deactivated accounts cannot reset their passwords without reactivating. • Enforce 2FA During Password Reset: Require 2FA verification as part of the password reset process.
Impact
Attackers with access to a user’s email can deactivate the account and reset the password, gaining full access without passing 2FA.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the account deactivation flow does not enforce 2FA on subsequent password reset and login, treating the deactivated state as exempt from the second factor.
Impact
An attacker with access to the victim's email could deactivate the account, reset the password, and gain full access without passing 2FA.
What the attacker needed
Victim has 2FA enabled; attacker has access to victim's email
The fix
The report recommends disabling password resets for deactivated accounts and enforcing 2FA during the password reset process.
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 report has not been written yet. The Original tab links to the source.
Two-factor authentication (2FA) is a second check, like a code from your phone, on top of your password. The report says that if you turn on 2FA and then deactivate your account, you can reset your password and log back in without being asked for the 2FA code. So someone who can read your email could take over the account without needing your phone.
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.