OAuth Misconfiguration: Preemptive Account Registration Exploitation
The OAuth flow did not verify whether an account already existed for an email before allowing registration. An attacker could register an account with a victim's email, and when the victim later completed OAuth registration, the attacker's account was confirmed, letting the attacker log in with their own credentials.
The OAuth misconfiguration allows an attacker to preemptively register an account using a victim’s email. When the victim later tries to register with OAuth, the system confirms the attacker’s account instead.
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 OAuth registration flow failed to check for an existing account before creating or confirming one, allowing an attacker to pre-register an email and have it confirmed by the victim's later OAuth login.
Impact
An attacker could gain access to an account intended for the victim, compromising account integrity.
What the attacker needed
Attacker knows victim's email; victim uses OAuth to register
The fix
The OAuth registration flow should verify email ownership and check for existing accounts before confirming or linking an account.
How it was found
- The attacker registers an account using the victim's email address before the victim uses OAuth.
- The victim later attempts to register using OAuth with the same email.
- The system sees an existing account for that email and confirms the attacker's account.
- The attacker logs in with the email and password they set during registration.
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 in with a service like Google, the website should check if your email is already linked to an account. Here, it did not check properly. An attacker could create an account using someone else's email first, and when the real owner later signed in with OAuth, the system treated the attacker's account as confirmed, 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.