Skip to content
Account takeover Write-up Beginner

Bypassing Email Verification to Hijack Any Account — No User Interaction Needed

The email verification endpoint trusted a client-supplied email parameter alongside the token, so a token issued for the attacker's own address could be reused to verify any other address. An attacker could verify a victim's email without access to their inbox, and if email equals username, then trigger a password reset to take over the account.

Tanvir0x1 Follow

Published on medium.com

Imagine being able to take over any user’s account on a website — no phishing, no password reset, no access to their inbox.

Tanvir Ahmed, 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

The backend did not bind the verification token to the email address it was issued for and trusted the client-supplied email parameter.

Impact

The attacker could verify a victim's email without any interaction, and if email equals username, could then initiate a password reset and take full control of the account.

What the attacker needed

Victim's account exists or is being created; attacker can register with own email; proxy tool to intercept requests

The fix

The verification token should be bound to the specific user or email on the server side, and any client-supplied email parameter should be ignored during verification.

How it was found

  1. Register an account using the victim's email address so a verification email is sent to them.
  2. Register a second account with the attacker's own email and receive a legitimate verification link.
  3. Click the link but intercept the request with a proxy to capture the verification request.
  4. Change the email parameter in the request from the attacker's address to the victim's address.
  5. Forward the request; the server verifies the victim's email even though the token was issued for the attacker.

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 site emails you a link containing a secret code (a token) to prove the address is yours. Here the site also let the browser say which email the token was for, and it believed that claim. So an attacker could take their own valid token and simply change the email next to it to someone else's address, and the site would mark that address as verified.

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.

More by Tanvir0x1

View all

1 more disclosed report, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Account takeover

The lesson behind this report.

Getting into someone else's account through a flaw in sign-in, password reset, second factor, single sign-on or session handling.