Skip to content
Account takeover Write-up Beginner

How I was able to verify any contact number for my account?

The web application allowed a user to verify any phone number by manipulating the server's response to an incorrect OTP. An attacker could intercept the OTP verification response and change the status code to 204, tricking the client into believing verification succeeded.

Paras Arora Follow

Published on medium.com

{{media:0}}

Paras Arora, 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 client-side application trusted the HTTP response status code to determine OTP verification success, rather than the server enforcing verification on the backend.

Impact

An attacker could verify any phone number without possessing the OTP, potentially bypassing second-factor authentication if phone verification is used as a security measure.

What the attacker needed

A free account on the portal; ability to intercept HTTP responses

How it was found

  1. Register and log in to the portal.
  2. Add a phone number and request an OTP.
  3. Intercept the OTP verification response.
  4. Submit an incorrect OTP and observe the error response.
  5. Modify the response status code to 204.
  6. The phone number is verified without a valid 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 add a phone number, the app sends a one-time code (OTP) to prove you own it. The server checks the code and replies with a success or failure message. Here, the author found that by editing the failure reply to look like a success, the app accepted any phone number without the correct code.

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 Paras Arora

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.