Email Verification OTP Bypass €€ — How I verified any email
The email verification flow did not bind the OTP to the email address being verified, so an attacker could change the emailAddress parameter in the verification request to mark any email as verified without the owner's involvement. This could lead to account takeover if the application uses verified email for login, password reset, or account linking.
Published on medium.com
I am Ankit Rathva and i am a student of MCA 1st year, I am an ethical hacker and security researcher with a passion for finding logic, authorization, and data-integrity flaws in web applications. As a bug bounty hunter and red teamer, he combines hands-on testing, forensic analysis, and careful disclosure to help…
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 server did not bind the OTP to the specific email address being verified, allowing the emailAddress parameter to be changed without invalidating the OTP.
Impact
An attacker could mark any email as verified without the owner's involvement, potentially leading to account takeover or unauthorized access if the application uses verified email for login, password reset, or account linking.
What the attacker needed
A free account; ability to intercept requests
The fix
The server should bind the OTP to the specific email address being verified and reject any request where the emailAddress parameter does not match the OTP's intended recipient.
How it was found
- Create a new account and log in.
- Go to the account management page.
- Change the account email to a controlled attacker address; the site generates two OTPs.
- Intercept the outgoing verification request using a proxy.
- Modify the emailAddress parameter to the victim's email address.
- Forward the request to mark the victim's email as verified.
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 on a website, it often sends a one-time code (OTP) to confirm you own the new address. This report found that the server did not check that the code was actually for the email address you were trying to verify. An attacker could intercept the request and swap in someone else's email address, making the system think that address was verified even though the real owner never got a 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.