Bug Bounty : How an OTP Bypass Got Me in the Hall of Fame
The account verification flow relied on a client-side success flag in the GraphQL response, so an attacker could change a failed OTP check into a success and complete registration without owning the email address.
medium.com
Published on medium.com
One of the sweetest moments for any bug bounty hunter is when a finding lands you a spot in the Hall of Fame. This write-up is about how I stumbled upon a simple but impactful bug, an OTP bypass through response manipulation.
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 made the verification decision from a response field rather than the server enforcing the OTP check and only issuing a verified session on success.
Impact
This could allow creating accounts without owning the email, impersonating other users, and running social engineering attacks through a legitimate-looking platform.
What the attacker needed
A dummy email address; ability to intercept and modify responses; a free account signup flow
The fix
The issue was fixed after responsible disclosure; the server should enforce OTP validation and not rely on client-side response fields.
How it was found
- Sign up with a dummy email address.
- Receive the OTP but enter an incorrect code.
- Intercept the verification response in Burp Suite.
- Change the success flag in the response from false to true.
- Forward the modified response and observe the redirect to account settings.
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 server checks the one-time code (OTP) sent to your email. Here, the server sent back a message saying the code was wrong, but the browser decided whether to continue based on a simple true/false value in that message. By changing that value before it reached the browser, the tester made the site believe the code was 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.