Skip to content
OAuth / SSO Write-up Intermediate

Hijacking User’s Private Information access_token from Microsoft Office360 facebook App

The Microsoft Office 365 Facebook app allowed a redirect_uri to any *.outlook.com domain without enforcing HTTPS, so an attacker could redirect the OAuth access token to a domain they control. By using response_type=token, the token was exposed in the URL fragment, allowing theft of the victim's Facebook access token and access to their private data.

Mohamed A. Baset Follow

Published on seekurity.com

Hi Guys, Today i would like to show you how a single misconfiguration issue would jeopardize the user’s privacy if maliciously exploited hence hijack user “accesstoken” from Microsoft Office360 facebook App. Microsoft decided that this Office365 facebook app is NOT under their Microsoft Online Services bug bounty…

Mohamed A. Baset, on seekurity.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 steal a user's Facebook access token and thereby access the private information and permissions granted to the Microsoft Office 365 Facebook app, including offline access and friends' data.

What the attacker needed

Victim has already granted permissions to the app; victim clicks a crafted link; attacker controls a domain or open redirect

How it was found

  1. Craft a Facebook OAuth URL for the Microsoft Office app with response_type=token and a redirect_uri pointing to an attacker-controlled outlook.com subdomain or an open redirect.
  2. Send the link to a victim who has already granted permissions to the app.
  3. The victim clicks the link and Facebook redirects to the attacker's URL with the access token in the fragment.
  4. The attacker captures the access token and uses it to access the victim's private data.

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 to a website using Facebook, Facebook sends a special code (called an access token) back to the website. This report found that the Microsoft Office app told Facebook it could send that code to any address ending in outlook.com, even insecure ones. An attacker could trick Facebook into sending the code to a website they controlled, and then use it to read the victim's private information.

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 Mohamed A. Baset

View all

20 more disclosed reports, best first.

More from Microsoft

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.