Skip to content
XSS Disclosed report Intermediate

muber-id Query Parameter Can Generate SSL-protected Reflected XSS in https://m.uber.com/0-dfffb25d2cf6ceeb0a27.js Endpoint

The muber-id query parameter on a mobile JavaScript endpoint was reflected unescaped inside a double-quoted JavaScript string, allowing an attacker to break out and inject arbitrary HTML and script. The endpoint's Content Security Policy also allowed a wildcard cloudfront.net host and lacked a base-uri directive, which the reporter says could be abused to load attacker-hosted files or redirect relative script URLs.

gregoryvperry Follow

Originally disclosed on HackerOne

Critical 9.1 View original
  • Disclosed after 4 days

Summary

The muber-id request parameter at the https://m.uber.com/0-dfffb25d2cf6ceeb0a27.js mobile endpoint is copied into a javascript string encapsulated in double quotation marks, resulting in SSL-protected payloads being reflected unmodified in the application's response. The script-src whitelist at the endpoint includes a wildcard *.cloudfront.net host, which could be used by any attacker with an Amazon Web Services account to provision an arbitrary cloudfront.net host to serve trusted files from. The endpoint also has a missing base-uri, which allows the injection of base tags. They can be used to set the base URL for all relative (script) URLs to an attacker controlled domain. In addition to the reflected XSS issue, both the script-src and basi-uri issues are considered high severity findings under Content Security Policy 3.

Security Impact

Using the muber-id query variable, arbitrary SSL-protected XSS can be reflected unescaped from the https://m.uber.com/0-dfffb25d2cf6ceeb0a27.js mobile endpoint, resulting in the ability for an attacker to generate arbitrary javascript and/or html content.

Reproduction Steps

https://m.uber.com/0-dfffb25d2cf6ceeb0a27.js?muber-id=%22%7D}</script><div%20class%3D%27_b%20_c%20_d%20_e%20_f%20_g%20_h%20_i%20_a3%20_a4%20_a5%20_a6%20_a7%20_a8%20_a9%20_aa%20_ab%20_ac%20_ad%20_ae%20_af%20_ag%20_ah%20_ai%20_aj%20_ak%20_al%20_am%20_an%20_ao%20_ap%20_aq%20_ar%20_as%20_at%20_au%20_av%20_aw%27><a%20href%3D"http%3A%2F%2Fwww.lyft.com">Some%20arbitrary%20link%20text<%2Fa><%2Fdiv>%0A

Impact

With a properly crafted javascript and/or html page, an attacker could harvest Uber login and password credentials, credit card payment information etc.

The original report as published on HackerOne, by gregoryvperry. 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 muber-id parameter was inserted into a double-quoted JavaScript string without escaping or encoding, and the page's Content Security Policy was too permissive (wildcard cloudfront.net host, no base-uri).

Impact

An attacker could craft a link that runs arbitrary script or HTML in the victim's browser and could harvest login credentials and payment card details, though the text does not show this being carried out.

What the attacker needed

Victim opens a crafted link; endpoint reachable over HTTPS

How it was found

  1. Open the mobile JavaScript endpoint with a crafted muber-id value that closes the JavaScript string and adds HTML markup.
  2. Observe that the value is reflected unmodified in the response and the injected markup is rendered.

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.

A web page sometimes takes a value from the address bar and writes it into the page without cleaning it. If that value contains HTML or script, the browser runs it as if the site itself had written it, which is called reflected cross-site scripting. Here the value was placed inside a JavaScript string, so a crafted link could break out of the string and add attacker content.

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 gregoryvperry

View all

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