Skip to content
Account takeover Write-up Intermediate

Pre-Account Takeover via OAuth Linking and Missing Email Verifica

The application allowed account creation with an email address without verifying ownership, and later automatically linked a Google OAuth login for the same email to that unverified account. An attacker could pre-register an account using a victim's email and potentially retain access to the victim's workspace after the victim signs in with OAuth.

Muzamil Follow

Published on medium.com

While testing authentication flows on a web application, I discovered a security issue related to account creation, email verification, and OAuth-based login linking. The issue allowed potential account overlap between attacker-created accounts and legitimate users signing in via Google OAuth.

Muzamil, 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 application did not require email verification before activating an account and automatically linked OAuth identities to existing unverified accounts without confirmation.

Impact

This could lead to pre-account takeover, unauthorised access to user accounts and workspaces, and potential exposure of subscription features, though the report notes the outcome may depend on session state.

What the attacker needed

Attacker can create an account with any email; victim later logs in with Google OAuth

The fix

The issue appears to have been addressed and resolved, but the proper fix would be to require email verification before account activation and to avoid automatically linking OAuth identities to unverified accounts.

How it was found

  1. Create an account using any email address without completing email verification.
  2. Set a password and log in using the created credentials.
  3. Log out and keep the account active in the system.
  4. The legitimate owner of the same email logs in using Google OAuth.
  5. The system links the OAuth identity to the existing unverified account.
  6. The original credentials may still allow access to the same account/workspace depending on session state.

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 for a website, it should check that the email address really belongs to you. Here, the site let anyone create an account with any email address without proving they owned it. Later, when the real owner of that email logged in with Google, the site connected their Google login to the attacker's pre-made account, so the attacker might still get in.

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.