Skip to content
Account takeover Write-up Beginner

How I discovered my first valid Bug

The web application verified email addresses, phone numbers, and 2FA setup using client-side checks instead of server-side validation. An attacker could register and verify any email address or phone number without possessing the OTP, and could set up 2FA without proper verification.

hayersam4 Follow

Published on medium.com

This was the first bug I discovered in a employee managment web application. After discovering the bug, I responsibly reported it to the oraganization and it was validated.

cipher, 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

Impact

An attacker could register and verify any user's email address without access to the OTP, and the same flaw affected phone verification and 2FA setup, potentially leading to account takeover or bypass of two-factor authentication.

What the attacker needed

Access to the web application; ability to register an account

How it was found

  1. Register a new account and receive a verification email with an OTP.
  2. Enter a random OTP and capture the response.
  3. Enter the correct OTP and capture the response.
  4. Replace the wrong OTP response with the correct response to bypass verification.

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 app sends a one-time code (OTP) to prove you own the email or phone. Here, the app trusted the browser to say the code was correct, so someone could fake the 'correct' response and skip the real check. This let them verify any email or phone number without actually receiving the 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.