Skip to content
Business logic Write-up Beginner

When OTP Forgets Who You Are

An OTP verification page could be accessed directly via its URL without any prior login, session, or cookie, meaning the second step of authentication did not verify that the first step had occurred. An attacker could reach the OTP input step without authenticating, potentially enabling abuse of the verification logic.

medium.com

Published on medium.com

This post isn’t about breaking accounts. It’s about understanding why OTP without identity is meaningless, how to spot this pattern safely, and how to stay ethical while learning.

Viratavi, 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 OTP page was not tied to a server-side session or state, so it did not verify that the user had completed the first authentication step.

Impact

Anyone could reach the OTP verification step without logging in, which could allow abuse, bypass paths, or misuse of the verification logic.

What the attacker needed

None

The fix

OTP pages should be bound to a server-side session and associated with a specific user and action, rejecting access if the first step was never completed.

How it was found

  1. Log in normally with username, password, and OTP.
  2. Notice the OTP page has a simple URL path with no token.
  3. Open a fresh incognito window and paste the OTP URL.
  4. Observe that the OTP page opens without login, session, or redirect.

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 log in, the site often asks for a one-time code (OTP) as a second step. Normally the site should only show that code page after you have entered your username and password. Here, anyone could open the code page directly, so the site was not checking that the first step had happened.

What is Business logic?

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.

Similar reports

View all

Same bug class and techniques, clearest first.

Business logic flaws

The lesson behind this report.

The application works as coded but not as intended: a negative price, a skipped payment step, a limit that can be crossed.