Skip to content
Account takeover Write-up Beginner

Authentication Bypass via OTP Response Manipulation

The registration and OTP verification flow trusted client-side responses, so an attacker could tamper with the server's failure messages to make them appear successful. This allowed creating accounts with fake data without a valid mobile number or OTP.

medium.com

Published on medium.com

During my latest penetration testing engagement , I discovered a high authentication bypass vulnerability in the registration and OTP verification process. An attacker can register an account using invalid or fake data and manipulate server responses to bypass both mobile number verification and OTP validation.

Youssefhussein, 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 application relied on client-side responses to decide whether registration and OTP verification succeeded, instead of enforcing those checks on the server.

Impact

Unauthenticated attackers could register fake accounts, bypassing phone and OTP checks, potentially leading to spam, fraud or automated bot registrations.

What the attacker needed

No account needed; Ability to intercept and modify HTTP responses

The fix

The application should enforce all OTP and phone number checks on the server side and never trust client responses for critical flows.

How it was found

  1. Go to the registration page and start a new registration.
  2. Fill the form with fake mobile number, password, name and email.
  3. Submit the form and intercept the server response, which shows a failure due to invalid mobile number.
  4. Modify the response to indicate success and forward it, making the OTP field appear.
  5. Enter a random OTP and intercept the OTP verification response.
  6. Modify the OTP response from failure to success, completing registration with fake data.

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, the website checks your phone number and sends a one-time code (OTP). Here, the website's response telling the browser 'that failed' could be edited by the user to say 'that worked', and the site believed it. So someone could create an account with a fake phone number and any 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.

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.