Oauth Misconfig — Leads to Account Takeover
The site allowed an attacker to pre-register an account using a victim's email and a chosen password, and when the victim later signed in with Google OAuth the accounts were linked, giving the attacker access. The attacker could then log in as the victim and change settings or view payment details.
Published on infosecwriteups.com
This is my first writeup for the vulnerability that I reported and got the first bug bounty amount.
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 site linked an OAuth identity to an existing account by matching email address without verifying that the account owner had consented or that the email was verified.
Impact
An attacker could access the victim's account at will, change settings and potentially view premium or payment details.
What the attacker needed
Attacker knows victim's email; victim later uses Google OAuth sign-in; no email verification before linking
The fix
The site should verify email ownership before linking an OAuth identity to an existing account, for example by requiring confirmation or a password before linking.
How it was found
- Sign up with the victim's name and email and set a password.
- The attacker now has access using that email and password.
- The victim later signs in using Google OAuth.
- The victim is not asked to set a password, and the accounts are linked.
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.
OAuth is a way to sign in to a site using another service, like Google, instead of a password. Here the site did not check that the person who signed up with an email address actually owned it, so an attacker could create an account with someone else's email and a password they chose. When the real owner later used Google sign-in, the site treated it as the same account, letting the attacker 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.