Skip to content
XSS Disclosed report Intermediate

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

The udi-id query parameter on a mobile Uber endpoint was reflected unescaped inside a double-quoted JavaScript string, letting an attacker inject closing script and HTML markup. An attacker could therefore run arbitrary script and HTML on the page, for example to harvest login credentials or payment details.

gregoryvperry Follow

Originally disclosed on HackerOne

Critical 9.1 View original
  • Disclosed after 4 days

Summary

The udi-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 udi-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?udi-id="%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 udi-id parameter was inserted into a double-quoted JavaScript string without escaping or encoding, so quote and closing-tag characters broke out of the string and the script context.

Impact

An attacker could run arbitrary script and HTML on the endpoint and could harvest Uber login and password credentials and credit card payment information; the report also notes that the script-src wildcard and missing base-uri weaken the page's Content Security Policy.

What the attacker needed

Victim opens a crafted link; endpoint reachable over HTTPS

How it was found

  1. Open the mobile endpoint URL with the udi-id parameter set to a crafted value that closes the JavaScript string and script element.
  2. The crafted value also adds HTML markup such as a div and a link pointing to an external site.
  3. The response reflects the value unmodified, so the browser renders the injected markup and script.

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 straight into the page's code without cleaning it. If that value contains characters that end the surrounding code and start new markup, the browser treats the attacker's text as part of the page. Here the value was placed inside a quoted JavaScript string, so a crafted link could break out and run the attacker's own script on Uber's mobile 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 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.