Skip to content
Account takeover Write-up Beginner

I Took Over My Own Account With Google Login (And It Worked?!)

The author found that signing up with an email and password, then later logging in with Google using the same email, automatically linked the accounts and granted access to the existing account without any verification. An attacker who knows a victim's email could pre-register an account and later take it over when the victim uses Google login.

medium.com

Published on medium.com

This is called a Pre-Account Takeover, and if you’re building login systems, this might scare you a bit.

Yukeshwaran N, 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 automatically links a Google login to an existing account based solely on the email address, without verifying that the person controls that email or requiring the original password.

Impact

An attacker who knows a victim's email could pre-register an account and later take it over when the victim signs in with Google, gaining access to any data the victim adds.

What the attacker needed

Attacker knows victim's email; Site offers both email/password and Google login; No email verification required

How it was found

  1. Sign up with an email and password using the victim's email address.
  2. Add some data to the account (profile info, cart items, etc.).
  3. Log out.
  4. Click 'Continue with Google' using the same email address.
  5. Observe that you are logged into the same account without any verification.

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 with an email and password, the site creates an account for that email. If you later click 'Sign in with Google' using the same email, the site should ask you to prove you own the account or link them safely. Here, it just let the person in, so anyone who knew your email could create the account first and then access it when you try to log in with Google.

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.