Skip to content
Account takeover Write-up Intermediate

Discovering Facebook OAuth Misconfigurations: A Journey into Pre-Account Takeover

The Facebook OAuth login did not verify that the email address from Facebook matched the email used to register a local account. An attacker could register an account with a victim's email, then log in with the victim's Facebook account to take over the victim's account.

cybershree Follow

Published on medium.com

In the ever-evolving landscape of web security, each day can feel like a new adventure. As a bug bounty hunter, I thrive on the challenge of uncovering vulnerabilities and helping platforms strengthen their defenses.

Shridhar Rajaput, 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 OAuth implementation did not verify that the email address from Facebook matched the email of the existing local account before linking them.

Impact

An attacker could take over a victim's account if the victim's email is known and the attacker can register an account with that email without verification.

What the attacker needed

Victim's email address known; no email verification on registration; victim has a Facebook account linked to that email

How it was found

  1. Register a local account using the victim's email address without verifying the email.
  2. Log out of the newly created account.
  3. Log in using Facebook SSO with the Facebook account linked to the victim's email.
  4. Observe that you are logged into the victim's account.

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 Facebook, the website should check that the email Facebook gives matches the email you used to sign up. Here, it did not check, so someone could create an account using your email and then log in with your Facebook to access your 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.