OTP Bypass: How Hackers Break “Unbreakable” OTP Verification
The author found that submitting an empty OTP field during signup verification on a shopping app resulted in successful verification. This allowed bypassing OTP verification without knowing the correct code.
medium.com
Published on medium.com
A few months back, I was testing a shopping app’s signup page. You know the drill—enter your phone number, get an OTP, type it in, and you’re verified.
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 backend skipped the OTP check when the OTP parameter was missing or empty, defaulting to success instead of rejecting the request.
Impact
An attacker could verify any phone number or email without owning it, potentially leading to account takeover or bypassing signup restrictions.
What the attacker needed
Access to the signup/verification flow; ability to intercept and modify requests
The fix
The server should explicitly reject requests where the OTP is missing or empty, and only proceed if a valid OTP is provided and matches the expected value.
How it was found
- Go to the signup page and enter a phone number to request an OTP.
- Capture the OTP verification request.
- Remove the OTP value or leave it empty.
- Send the modified request.
- Observe that the response says 'Verified successfully'.
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.
OTP (one-time password) is a short code sent to your phone or email to prove it's you. The app is supposed to check that the code you type matches the one it sent. Here, the app forgot to check properly, so sending nothing at all was treated as correct.
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.