Skip to content
OAuth / SSO Write-up Intermediate

IE/Firefox Redirection Issue – FB Oauth2 Bypass – BugCrowd

The report describes a Facebook OAuth2 redirection bypass where a crafted URL could send a user's OAuth token to an attacker's domain. The attacker needed an authorised Facebook app to exploit the issue.

soroush.me

Published on soroush.me

Several weeks ago, I reported an interesting PoC via my Twitter in which I had created a web page that stops Firefox and IE browsers to redirect users to their intended destination even if they had typed it directly in the address bar: https://twitter.com/irsdl/status/294239415428067329

The author, on soroush.me

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 a flaw in how Facebook validated the redirect URL, allowing crafted characters to bypass restrictions and send the OAuth token to an unintended domain.

Impact

An attacker could hijack a user's OAuth token, potentially leading to account takeover, but only if the attacker had an authorised Facebook app.

What the attacker needed

An authorised Facebook app; victim clicks a crafted link

How it was found

  1. Find an authorised Facebook app.
  2. Craft a URL with special characters to bypass redirection restrictions.
  3. Send the crafted URL to a victim.
  4. The victim's OAuth token is sent to the attacker's domain.

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.

OAuth2 is a way for websites to let you log in using another service, like Facebook. When you log in, Facebook gives the website a special code (token) that proves who you are. This bug let an attacker trick Facebook into sending that code to the attacker's own website instead of the legitimate one, so the attacker could take over your account.

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.

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.