Skip to content
Account takeover Write-up Intermediate

This OAuth Bug Earned Me $$$$: Account Takeover via Identity Inje

The OAuth login flow accepted a client-supplied email parameter in the Facebook profile data POST request, allowing an attacker to log in as any user by injecting the victim's email address. This led to full account takeover, including the ability to change the victim's email.

hacker_might Follow

Published on medium.com

Ever wondered what happens when OAuth trusts you a little too much? I found a way to log into any account — no password, just an email and a little creativity.Here’s how an old but gold OAuth misconfiguration quietly handed me the keys.

hacker_might, 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

Impact

Any user account could be taken over by simply knowing their email, with no password or confirmation needed, enabling mass exploitation and full identity compromise.

What the attacker needed

Attacker has a Facebook account with no email; Victim's email address is known; Attacker can intercept HTTP requests

The fix

The OAuth flow should be fixed by not trusting client-supplied email parameters and instead using only verified data from the identity provider.

How it was found

  1. Create a Facebook account using only a phone number, with no email attached.
  2. Log into that account and go to the target site's login page.
  3. Choose 'Sign in with Facebook' and start intercepting requests.
  4. After redirects, spot a POST request containing Facebook profile data.
  5. Inject an email parameter set to the victim's email address.
  6. Forward the modified request and stop intercepting to be logged in as the victim.

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 log in using another service, like Facebook. The site trusted extra information sent during that login without checking it, so an attacker could pretend to be someone else by adding their email address. This let the attacker log in as any user without a password.

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.

More by hacker_might

View all

18 more disclosed reports, best first.

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.