Skip to content
Account takeover Write-up Intermediate

Improper phone number validation to account takeover

The signup and login flows only checked the phone number format on the client side, so an attacker could intercept the OTP request and verification, swap in their own number, and receive and verify an OTP for a Russian number they did not own. This allowed them to log in as that user.

shesha sai_c Follow

Published on sheshasai.medium.com

Let us consider the site as redacted.com as the program does not support disclosures.

shesha sai_c, on sheshasai.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 trusted the phone number supplied by the client during OTP generation and verification without binding the OTP to the original number or re-validating the country restriction server-side.

Impact

An attacker could take over accounts by logging in as any user whose phone number they know, bypassing the Russia-only restriction.

What the attacker needed

A Russian phone number (can be from a public SMS site); ability to intercept HTTP requests (e.g., Burp Suite); victim's phone number known

The fix

The server should validate the phone number and country restriction on every request and bind the OTP to the exact number it was issued for.

How it was found

  1. Visit the signup page.
  2. Enter any Russian phone number.
  3. Intercept the request and change it to your own number to receive an OTP call.
  4. Enter the OTP, intercept the verification request, and change the country code and number back.
  5. You are logged in as the Russian number user; the same works for login.

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 with a phone number, the app sends a one-time code (OTP) to prove you own it. Here, the app only checked the number format in the browser, not on the server, so someone could change the number in the request to their own, get the code, and then change it back to log in as the original user.

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 shesha sai_c

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.