Skip to content
OAuth / SSO Write-up Intermediate

OAuth Impersonation Attack: Misconfiguration of Facebook and Google OAuth Leading to Account…

The vulnerable application accepted Facebook OAuth access tokens without verifying that they were issued for its own app. An attacker could use a token generated for a different Facebook app to log in as any user who had an account on both apps, taking over their account.

security.tecno Follow

Published on medium.com

I am Md Rafi Ahamed(Rafi Ahamed (Leonidas D. Ace)), a Cyber Security Researcher, Bug Bounty Hunter, and Penetration Tester from Bangladesh.

TECNO Security, 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

An attacker could take over the accounts of users who have accounts on both the vulnerable application and the attacker's application.

What the attacker needed

Attacker has a Facebook app with OAuth login; Vulnerable app does not verify the token; Victim has accounts on both apps

How it was found

  1. Log in to the vulnerable application using Facebook.
  2. Capture the login request with Burp.
  3. Obtain an access token from another Facebook app (the attacker's app).
  4. Replace the vulnerable application's access token with the attacker's token.
  5. The application logs you in as the user associated with that token.

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 log in with Facebook, Facebook gives the website a temporary pass (an access token) that proves who you are. The website is supposed to check with Facebook that this pass was made for that specific website. Here it did not, so a pass made for a different website could be used to log in as someone else.

What is OAuth / SSO?

Mistakes in OAuth, OpenID Connect, SAML or token handling that leak codes and tokens or link an attacker's identity to a victim's account.

More by security.tecno

View all

2 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

OAuth and single sign-on flaws

The lesson behind this report.

Mistakes in OAuth, OpenID Connect, SAML or token handling that leak codes and tokens or link an attacker's identity to a victim's account.