Skip to content
Account takeover Write-up Beginner

Breaking The Registration Flow : A Pre-account Takeover Vulnerability

The OTP resend endpoint accepted arbitrary email and mobile values from the client without checking they belonged to the original registration session. An attacker could supply their own contact details, receive the OTP, and complete registration using the victim's data, leading to account takeover.

Fuzzyy Duck Follow

Published on meetcyber.net

While testing a registration flow recently, I came across an issue that looked insignificant at first. It involved the “Resend OTP” feature.

Fuzzyy Duck, on meetcyber.net

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

Impact

An attacker could take over an account before it is fully created, without the victim knowing.

What the attacker needed

Victim's email and mobile known; attacker can intercept requests

The fix

The resend OTP request should be tied to a server-side session or registration identifier, and the server should reject any new email or mobile values from the client.

How it was found

  1. Start a registration with the victim's email and mobile number.
  2. Intercept the resend OTP request.
  3. Replace the victim's email and mobile with the attacker's own.
  4. The OTP is sent to the attacker.
  5. Complete the registration using the victim's data and the attacker's OTP.

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 sign up, a website sends a one-time code (OTP) to your email or phone to prove it's you. The resend button should only send a new code to the same contact details you originally signed up with. Here, the server trusted whatever contact details the user sent, so an attacker could ask for the code to be sent to their own phone or email and then finish creating the account with the victim's details.

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.

More by Fuzzyy Duck

View all

1 more disclosed report, best first.

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.