Skip to content
Account takeover Write-up Intermediate

OAuth Misconfiguration Pre-Account Takeover

An OAuth misconfiguration allowed an attacker to register an account with a victim's email address before the victim verified it, and later the victim's OAuth signup with the same email linked to that unverified account, letting the attacker log in with the password they set. The attacker could then access the victim's account and sensitive data.

medium.com

Published on medium.com

Read For Free — https://nexguardians.com/oauth-misconfiguration-pre-account-takeover/

socalledhacker, 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 links OAuth identities to existing unverified local accounts by email address without requiring email verification first.

Impact

The attacker could gain unauthorised access to the victim's account and sensitive data, potentially leading to data theft and further attacks.

What the attacker needed

Attacker knows victim's email; victim has not yet verified email; victim later uses OAuth with same email

The fix

The application should require email verification before linking an OAuth identity to an existing local account, or should not allow unverified accounts to be linked.

How it was found

  1. Go to the target website.
  2. Register using the victim's email address via email registration.
  3. A verification process starts; do not verify it.
  4. The victim registers using their OAuth account with the same email and is logged in.
  5. The attacker can now log in to the victim's account using the normal email and password login.

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 should not let anyone else use that email until you prove you own it by clicking a verification link. Here, the site let an attacker create an account with someone else's email without verifying it, and later linked the real owner's Google login to that same account. So the attacker kept a password that also worked on the victim's account.

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.