How I Found Pre-Account Takeover Vulnerabilities
The application allowed an attacker to register an account with a victim's email address without verification, and later automatically linked a Google OAuth login with the same email to that account. This let the attacker gain full access to the victim's account once the victim signed up using Google.
Published on medium.com
My name is Montaser, and I’m a cybersecurity researcher interested in bug bounty and discovering real-world vulnerabilities.
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 verify email ownership and automatically linked OAuth accounts based on unverified email addresses.
Impact
An attacker could pre-register a victim's email and later gain full access to the victim's account when the victim signs up using Google, leading to account takeover, data access, and impersonation.
What the attacker needed
Attacker knows victim's email; Application allows email/password signup without…; Application supports Google OAuth login; Victim later signs up using Google
The fix
The application should enforce email verification before activating accounts and require user confirmation before linking OAuth accounts.
How it was found
- Sign up with the victim's email and a password; no email verification is required.
- Log out.
- Click 'Continue with Google' and log in using the same email.
- The application automatically links the Google account to the existing account without any confirmation.
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.
This bug is about signing up with someone else's email before they do. The site didn't check that the email really belonged to the person signing up, and it also trusted Google logins without asking for confirmation. So an attacker could create an account with the victim's email, and when the victim later used 'Sign in with Google', the site linked that Google account to the attacker's pre-made account, giving the attacker access.
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.