Account Takeover via Facebook Oauth
During Facebook OAuth registration, the application trusted the name and email parameters sent back to it without proper server-side validation. An attacker could change those parameters to another person's email address and register an account tied to that victim's identity.
medium.com
Published on medium.com
Have you ever seen a webpage where you can register via Facebook or Google or any other service? If yes, then you already know the use of OAuth.
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 trusted client-supplied name and email values in the OAuth callback instead of reading them from a verified token or server-side lookup.
What the attacker needed
Facebook OAuth login offered; Ability to intercept the OAuth request
How it was found
- Start the Facebook OAuth registration flow on the target site.
- Intercept the request that carries the name and email parameters.
- Change the name and email to the victim's values and forward the request.
- Observe the response confirming the account was created with the altered details.
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 click 'Log in with Facebook', the website receives some details about you, such as your name and email, and uses them to create your account. Here the site believed those details without checking them, so someone could swap in a different person's email address and have the account created for that person instead.
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.