Skip to content
Account takeover Write-up Intermediate

MFA Update OTP Bypass

During MFA setup, a user could change the registered mobile number after receiving an OTP and still verify using the OTP issued for the previous number. This could allow unauthorised mobile number registration and, if exploited cleverly, account takeover.

medium.com

Published on medium.com

Today I want to share an interesting security behavior I discovered during a bug bounty program.

Md. Abu Rayhan, on medium.com

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 did not bind the OTP to the mobile number it was issued for, so changing the number did not invalidate the existing OTP.

Impact

This could allow unauthorised mobile number registration and, if exploited cleverly, account takeover, weakening the MFA security model.

What the attacker needed

MFA setup flow; ability to change the registered number; a valid OTP for the old number

The fix

When a mobile number is updated, any previously issued OTP should be invalidated immediately.

How it was found

  1. Start MFA setup and receive an OTP on the registered phone.
  2. Change the registered mobile number.
  3. Submit the old OTP to complete verification.

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 set up two-factor authentication, the site sends a one-time code to your phone to prove it is yours. This report says the site did not tie that code to the phone number it was sent to, so someone could swap in a different number and still use the old code. That means the check that is supposed to protect your account could be passed with a code meant for a different 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.

Similar reports

View all

Same bug class and techniques, clearest first.

Account takeover

The lesson behind this report.

Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.