Strange 2fa Misconfiguration
The 2FA setup request accepted a changed phone number without verifying it, so the account's second factor was silently moved to a number the attacker controls. An attacker could then receive the login codes and also flood the victim's phone with SMS because there was no rate limit.
Published on infosecwriteups.com
Hey guys I am back again with another interesting bug bounty writeup. In this write-up, I am going to tell you about my recent finding on a VDP.
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 trusted the phone number supplied in the 2FA setup request and updated it without sending or checking a verification code for the new number.
Impact
An attacker could redirect the account's 2FA codes to a phone they control, and could also send many SMS codes to a victim's number because there was no rate limit.
What the attacker needed
An account on the target site; ability to intercept and edit requests; SMS-based 2FA enabled
How it was found
- Start setting up SMS-based 2FA and enter a phone number to receive an OTP.
- Enter the OTP and intercept the verify request.
- Change the phone number parameter in the request body to a different number.
- Observe a 200 OK response and the new number shown in the 2FA settings.
- Log out and log in again to confirm the 2FA code arrives at the changed number.
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 check at login, often a code sent by text message. Here the site let the user change which phone number receives that code without proving they owned the new number. That means someone who could edit the request could point the codes at their own 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.