Skip to content
OAuth / SSO Write-up Advanced

Traveling with OAuth Account Takeover on Booking.com

Booking.com's OAuth implementation allowed an attacker to steal a victim's Facebook OAuth code by chaining an overly permissive redirect_uri, an open redirect, and a mobile API parameter that controlled the token exchange redirect_uri. This enabled full account takeover of any Booking.com account using Facebook login, and by extension Kayak.com.

Aviad Carmel Follow

Published on salt.security

OAuth (Open Authorization) is a modern, open authorization standard designed to allow cross-application access delegation — for example, allowing your application to read data from your Facebook profile. Combined with the proper extensions, OAuth can also be used for authentication — for example, to log into your…

Aviad Carmel, Security Researcher, on salt.security

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 OAuth redirect_uri validation only checked the origin, not the exact path, and a mobile API endpoint accepted an attacker-controlled resultUri used as the redirect_uri during code exchange, combined with an open redirect on the same origin.

Impact

An attacker could take over any Booking.com account that uses Facebook login, perform actions on the victim's behalf, access personal information, and also log into Kayak.com with the compromised account.

What the attacker needed

Victim clicks a link; victim has a Facebook-linked Booking.com account; attacker has a Booking.com account; attacker can intercept mobile app traffic

The fix

The issues were fixed after disclosure, as Booking.com stated the vulnerability was swiftly resolved.

How it was found

  1. Craft a Facebook OAuth link with redirect_uri pointing to an open redirect on account.booking.com that forwards to an attacker domain.
  2. Set response_type to code,token so Facebook returns the code in the URL hash fragment.
  3. Send the link to a victim; after they approve, the code lands on the attacker's server.
  4. Intercept the mobile app's code-exchange request and replace the code with the victim's stolen code.
  5. Replace resultUri with the original attack redirect_uri to satisfy Facebook's validation.
  6. Send the modified request to Booking.com to log 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.

When you click 'Log in with Facebook', Facebook sends a temporary secret code back to the website. The website then swaps that code for your profile details. Here, the researcher found ways to make Facebook send that secret code to a server the attacker controlled, and then used it to log in as the victim.

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 Aviad Carmel

View all

4 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.