Email Verification Bypass Vulnerability: A Critical Flaw Exploite
The application reused the same one-time password across different email verification requests and did not tie it to a specific email address or session. An attacker could verify a victim's email address using an OTP sent to their own email, potentially taking over the account.
Published on medium.com
During a routine security assessment of a web application, I discovered a critical email verification bypass vulnerability. This flaw could allow an attacker to gain unauthorized access to a victim’s account by exploiting weaknesses in the OTP (One-Time Password) generation and validation process.
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
The OTP was not unique per request and was not bound to the email address or session, so a previously issued code remained valid for a different email.
Impact
An attacker could take over a victim's account by verifying the victim's email address, potentially exposing sensitive data and enabling widespread compromise if exploited across many accounts.
What the attacker needed
An account you control; a second email address you control; victim's email address known
The fix
The application should generate unique, random OTPs, bind each OTP to the specific email address and session, invalidate OTPs after use, and add expiration and rate limits.
How it was found
- Log in with an account you control.
- Change the email to another address you own and receive an OTP.
- Log out and log back in with your original credentials.
- Change the email to the victim's address and log out.
- Log in using the victim's email and enter the OTP that was sent earlier to your own address.
- The system accepts the OTP and verifies the victim's email.
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 change your email address, the site sends a short code to prove you own the new address. Here, the site sent the same code for different addresses and accepted it later for someone else's address. That let an attacker confirm a victim's email without ever seeing the code sent to the victim.
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.