Skip to content
OAuth / SSO Disclosed report Intermediate

OAuth access_token stealing in Phabricator

The Facebook OAuth flow used by Phabricator allowed a crafted link to send the victim's Facebook access token to the attacker's server.

krangbuster Follow

Originally disclosed on HackerOne

Bounty$450 View original
  • Fixed in 2 days
  • Paid in 2 days
  • Disclosed after 32 days

Hi,

I found that an attacker is able to steal access_tokens of facebook users via Phabricator App (184510521580034).

when users login to phabricator, they can choose to login via Facebook (https://secure.phabricator.com/login/) attaching pic, In this case an attacker is able to exploit this behavior to steal facebook access_tokens via phabricator app.

Full Reproduce, Exploit:

  1. Create a blog on phabricator https://secure.phabricator.com/phame/blog/new/

and provide a custom domain, in this case: files.nirgoldshlager.com

  1. send a malicious link to the victim: https://www.facebook.com/dialog/oauth?client_id=184510521580034&response_type=token&redirect_uri=https://secure.phabricator.com/phame/live/47/ , Click Continue

when the victim will click continue, his access token will be send to my malicious server, saved in a log file under: http://files.nirgoldshlager.com

PoC Video:

https://drive.google.com/file/d/0B2-5ltUODX1LWHV6R3gxSFAwNzQ/edit?usp=sharing

Attachments

loginviafacebook.jpg
loginviafacebook.jpg From the original on HackerOne

The original report as published on HackerOne, by krangbuster. 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 was not strictly validated against the registered callback, allowing a user-controlled custom blog domain to receive the token.

Impact

An attacker could steal a victim's Facebook access token.

What the attacker needed

Attacker can create a Phabricator blog; attacker controls a custom domain; victim clicks the crafted link and continues

How it was found

  1. Create a blog on Phabricator and give it a custom domain controlled by the attacker.
  2. Send the victim a Facebook OAuth link whose redirect_uri points to the Phabricator blog path.
  3. The victim clicks Continue and the access token is sent to the attacker's server and logged.

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.

The report shows the website let the token be sent to an address an attacker controlled, so the attacker received the secret.

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 krangbuster

View all

1 more disclosed report, best first.

More from Phabricator

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.