Skip to content
Account takeover Write-up Intermediate

Account Verification Bypass through JWT Misuse & CWE-347

The email verification endpoint accepted any valid session JWT instead of only the token sent in the verification email. An attacker could verify an account without access to the email inbox, bypassing the email ownership check.

RaunakGupta1922 Follow

Published on medium.com

Hiyya, I am Raunak Gupta, a Security Researcher and Bug Bounty Hunter for fun and profit.

Raunak Gupta Aka B1scuit, 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

Likely the verification endpoint did not check that the token was specifically issued for email verification, accepting any valid session JWT for the account.

Impact

An attacker could verify an account without access to the email inbox, bypassing the email ownership check.

What the attacker needed

A free account

How it was found

  1. Create a new account and note that unverified users cannot post comments.
  2. Intercept an authenticated request to obtain the session JWT.
  3. Replace the verification token in the verification URL with the session JWT.
  4. Visit the modified URL and observe the account becomes 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 sign up, the site sends a special link to your email to prove you own it. This link contains a token, a kind of digital pass. The site mistakenly accepted any valid login token for that account, not just the one from the email. So someone could skip the email step and still get 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 RaunakGupta1922

View all

3 more disclosed reports, 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.