Skip to content
Account takeover Write-up Intermediate

How i was able to bypass Email Confirm — P4

The email confirmation token was the same as the 'sub' claim in the JWT access token, so an attacker could confirm their email without clicking the link. This allowed bypassing the email confirmation requirement.

Mohammed Ehssan Follow

Published on web.archive.org

{{media:0}}

Mohammed Ehssan, on web.archive.org

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

Impact

An attacker could bypass the email confirmation step, potentially using unconfirmed accounts to access features that should require a confirmed email.

What the attacker needed

A free account; access to the confirmation email

How it was found

  1. Register a new account and receive a confirmation email.
  2. Log in before clicking the confirmation link.
  3. Observe that some pages require email confirmation.
  4. Search for the confirmation token in the page and JavaScript but find nothing.
  5. Decode the JWT access token and see the 'sub' claim.
  6. Compare the 'sub' value with the token in the confirmation email and find they match.

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, a website often sends a link to confirm your email. This report found that the secret code in that link was also visible inside the login token the site gave you, so you could confirm your email without ever using the link.

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.

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.