Skip to content
Account takeover Write-up Beginner

How I can take over any user’s account with their mobile number

The login and registration flow returned the one-time password in the server response, encoded in base64, so anyone who submitted a mobile number could decode it and complete verification. An attacker who knew a victim's mobile number could therefore log in as that user and take over the account.

Sushmitha Katikitala Follow

Published on medium.com

Hi everyone! Hope you all are healthy and safe.

Sushmitha Katikitala, 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 generated the OTP and included it in the response body (base64-encoded) instead of only sending it to the user's phone, and validation compared the submitted value against that same returned value.

Impact

An attacker who knows a victim's mobile number could take over that user's account on both registration and login.

What the attacker needed

Victim's mobile number known; ability to intercept HTTP traffic

How it was found

  1. Register an account and submit the registration form to reach the OTP page.
  2. Inspect the captured POST request and note the action parameter for OTP registration.
  3. Look at the response and observe the OTP returned in base64.
  4. Decode the base64 value to get the OTP that was sent to the phone.
  5. Submit the decoded OTP and complete registration.
  6. Repeat the same flow on the login page with another mobile number to log in as that user.

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 or log in, the site sends a one-time code (OTP) to your phone to prove it is you. Here the server also sent that same code back to the browser inside the response, only lightly disguised by base64 encoding, which is just a way of writing data that anyone can reverse. So the secret meant for your phone was effectively handed to whoever asked.

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.