Skip to content
XSS Disclosed report Intermediate

XSS in uber oauth

Mahmoud Gamal Follow

Originally disclosed on HackerOne

  • Disclosed after 3 months

Hi , I have found that when setting a redirect_uri for an application you validate for the presence of :// in the beginning of the url , but you don't validate for the protocol and you don't block malicious protocols such as javascript: pseudo protocol and data: URIs. Although the redirecting is done through location header , there still some cases in which this can be harmful to users and can be used to hijack users' accounts , moreover , data: URIs work on some modern browsers such as firefox. This also can be very harmful to users who chose to disable 302 redirection on their browser.

#PoC:

This PoC will work on latest version of opera mini mobile browser and it will also work on firefox with 302 redirection disabled.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<title>Redirecting...</title>
<h1>Redirecting...</h1>
<p>You should be redirected automatically to target URL: <a href="javascript://goog.com/%0Aalert(document.domain);//?error=access_denied#_">javascript://goog.com/%0Aalert(document.domain);//?error=access_denied#_</a>.  If not click the link.
  • As you can see , this will trigger XSS .

I have attached a screenshot of XSS triggered on firefox (latest version) with 302 redirection disabled.

The PoC will also work on old Mozilla and opera browsers , in browsers Mozilla 1.7.x (and previous versions) and Mozilla Firefox 3.0.12 , The browser will show “Object Moved” page. click on the link “here” and the code will execute.

Thanks

Attachments

uber_oauth_xss.png
uber_oauth_xss.png From the original on HackerOne

The original report as published on HackerOne, by zombiehelp54. 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.

What is known

A XSS bug in Uber. HackerOne made it public on 26 July 2016.

About XSS

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.

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

What is XSS?

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.

More by Mahmoud Gamal

View all

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

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.