2-factor authentication can be disabled when logged in without confirming account password
The two-factor authentication disable endpoint did not verify the account password, so an attacker with a stolen session cookie could turn off 2FA and take over the account.
- Disclosed after 16 days
Description
When users wants to Disable his/her TwoFactor Authentication, they have to know their account password. But using this vulnerability They don't need password to disable it. this will allow hacker who get someone cookie to disabling twofactor auth and also Fullytakeover the account.
How To Reproduce
- Open Your BurpSuite and Turn on the intercept
- Go To 2Factor Authentication page click the red buttons "Disable two factor ...."
- Put any wrong password and copy all the header
- Go to repeater and make a POST request to
https://localizestaging.com/api/user/two-factor/setalso Paste the header here. - add a body request like this
method=sms&phone=%2B62-hacker-phone-numberthen click GO - Bypassed !
Impact
disable twofactor authentication without needing to know the password
Attachments
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 endpoint that disables two-factor authentication did not require or verify the current account password before applying the change.
Impact
An attacker who already holds a victim's session cookie could disable two-factor authentication and fully take over the account.
What the attacker needed
A stolen session cookie; access to the two-factor settings page
The fix
The endpoint should verify the account password before disabling two-factor authentication.
How it was found
- Turn on interception in BurpSuite.
- Open the two-factor authentication page and click the disable button.
- Enter any wrong password and copy all the request headers.
- Send a POST request to the two-factor set endpoint in Repeater with those headers.
- Add a body that sets the method to SMS and supplies an attacker phone number, then send it.
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. Normally you must re-enter your password to turn 2FA off, but here the server accepted the request without checking it. Anyone who stole a logged-in session could switch off 2FA and then control the account.
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.