Skip to content
OAuth / SSO Disclosed report Intermediate

Chained Bugs to Leak Victim's Uber's FB Oauth Token

The Facebook OAuth application accepted any redirect_uri matching a broad pattern, and the next_url parameter could be chained with a logout endpoint that redirected based on the Referer header. An attacker could craft a single URL that prompted OAuth authorisation and then leaked the victim's token to an attacker-controlled site, enabling account takeover.

ngalog Follow

Originally disclosed on HackerOne

  • Triaged in 17 hours
  • Fixed in 6 days
  • Paid in 13 days
  • Disclosed after 24 months

Summary by the program

The Facebook OAuth application was misconfigured to allow any URL that followed the https://auth.uber.com/login?* format to be provided as a redirect_uri. By taking advantage of this, @ngalog was able to discover that the next_url parameter could be added to the redirect_uri allowing it to be chained further. Next, @ngalog found that the https://login.uber.com/logout endpoint would redirect based on the Referer header, making it possible to chain together another redirect. By piecing this together, @ngalog was able to provide us with an awesome single-URL PoC which would:

  1. Prompt OAuth authorization on facebook.com
  2. Redirect to https://auth.uber.com/login?next_url=https://login.uber.com/logout from Facebook
  3. Redirect to https://login.uber.com/logout from auth.uber.com
  4. Redirect to attacker site from Referer header and return the token

When combined, this would have allowed for a full account takeover and was a very creative and cool bug.

Nice work, @ngalog!

The original report as published on HackerOne, by ngalog. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the OAuth redirect_uri validation used a wildcard pattern that allowed chaining with an open redirect via the next_url parameter and a Referer-based redirect on the logout endpoint.

Impact

This could have allowed a full account takeover by leaking the victim's OAuth token to an attacker-controlled site.

What the attacker needed

Victim clicks a crafted link; victim authorises the OAuth app

How it was found

  1. The attacker provides a redirect_uri that matches the allowed pattern and includes a next_url parameter pointing to the logout endpoint.
  2. The victim is prompted to authorise the OAuth application on Facebook.
  3. Facebook redirects to the auth.uber.com login URL with the next_url parameter.
  4. auth.uber.com redirects to the logout endpoint specified in next_url.
  5. The logout endpoint redirects based on the Referer header to an attacker-controlled site.
  6. The attacker's site receives the OAuth 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 report has not been written yet. The Original tab links to the source.

OAuth is a way for websites to let you log in with another service, like Facebook. The service sends you back to the website with a special code or token. If the website accepts too many different return addresses, an attacker can trick it into sending that token to their own site, letting them 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.

More by ngalog

View all

21 more disclosed reports, best first.

More from Uber

View all

The newest disclosed reports for this program.

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.