Skip to content
XSS Disclosed report Beginner

XSS on partners.uber.com

A reflected cross-site scripting vulnerability existed on the Uber partners signup page because the 'location' GET parameter was reflected without validation or sanitisation. An attacker could craft a link that executes arbitrary JavaScript in a victim's browser when the page is opened without an existing session cookie.

kirtixs Follow

Originally disclosed on HackerOne

Bounty$500 View original
  • Triaged in 2 days
  • Fixed in 9 days
  • Paid in 17 days
  • Disclosed after 15 months

Hello,

I have discovered a reflected XSS on partners.uber.com

When accessing https://partners.uber.com/signup/global/ with the appropriate parameters, for example: https://partners.uber.com/signup/global/?referrer_uuid=21f5fbbd-b79f-4a16-9976-01096fb556c7&place_id=ChIJPaCKh-tmA4wR7JEkNDrNDSU&utm_source=twitter&location=Carolina%2C+Carolina%2C+Puerto+Rico&lat=18.3807819&lng=-65.95738719999997 in a browser where the page has not been accessed previously in the current session (no session cookie on partners.uber.com), the GET-parameter location is reflected in the page without validation/sanitation.

POC (tested with Firefox 34.0): https://partners.uber.com/signup/global/?place_id=ChIJPaCKh-tmA4wR7JEkNDrNDSU&location=Carolina<script>alert(1)</script>a%2C+Carolina"%2C+Puerto+Rico&lat=18.3807819&lng=-65.95738719999997

The best, Simon

The original report as published on HackerOne, by kirtixs. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

The original is short, so this covers everything it reports, then explains this kind of bug in general: how it works, how to test for it and how it is fixed. The general sections are about the bug class, not this target. Written with AI and checked against the original; the original is the record. 4 min read.

What the report shows

The target is the global signup page on partners.uber.com, the partner-facing side of Uber. The researcher, kirtixs, reported a reflected cross-site scripting issue in the location GET parameter and was awarded a bounty of 500.00 USD. The report was disclosed on 2016-03-24. No severity or CVSS score is given.

The behaviour depends on the visitor having no session cookie for partners.uber.com yet. The researcher states that the parameter is reflected without validation or sanitisation when the page is opened in a browser where the page has not been accessed previously in the current session.

The full request the researcher used as the baseline looks like this:

HTTP
https://partners.uber.com/signup/global/?referrer_uuid=21f5fbbd-b79f-4a16-9976-01096fb556c7&place_id=ChIJPaCKh-tmA4wR7JEkNDrNDSU&utm_source=twitter&location=Carolina%2C+Carolina%2C+Puerto+Rico&lat=18.3807819&lng=-65.95738719999997

The proof of concept, tested with Firefox 34.0, replaces the value of location with a script tag:

HTTP
https://partners.uber.com/signup/global/?place_id=ChIJPaCKh-tmA4wR7JEkNDrNDSU&location=Carolina<script>alert(1)</script>a%2C+Carolina"%2C+Puerto+Rico&lat=18.3807819&lng=-65.95738719999997

Steps as the report describes them:

  1. Open the signup page with the parameters above in a browser with no existing session cookie for partners.uber.com.
  2. Observe that the location value is written into the page without validation or sanitisation.
  3. Supply a location value containing a script tag and confirm that the script executes, here a simple alert(1).

The report does not describe the fix that was applied.

Root cause

The page takes a user-controlled query parameter and places it into the HTML response without encoding it. The report does not describe how the value reaches the page. The researcher notes the reflection only appears when no session cookie is present.

Impact

The report shows script execution when the crafted link is opened in a browser with no session cookie for the site. That would let the script act as the victim on the partner site, for example reading page content or making requests with the victim's session. The report itself only demonstrates alert(1) and does not show a concrete attack chain, so the practical impact beyond script execution is not established in the text.

How this kind of bug works

Reflected XSS arises when an application echoes part of the request back into a response without context-aware output encoding. The browser parses the response as HTML (or as script), so any markup the attacker injected becomes part of the document and executes under the origin of the site. Because the script runs with that origin, it is not constrained by the same-origin policy with respect to that site: it can read the DOM, use the user's cookies, and issue same-origin requests.

The bug class persists because templating engines and manual string building make it easy to drop a value into a page, and because the same parameter may be safe in one context (an HTML attribute) and dangerous in another (inside a <script> block or an unquoted attribute). Defences are output encoding matched to context, a restrictive Content-Security-Policy, and treating all request data as untrusted.

How to test for it

  1. Map every place where request data appears in a response: query parameters, path segments, headers such as Referer and User-Agent, and form fields that are echoed back on error or confirmation pages.
  2. For each candidate, send a benign marker value and locate it in the response body. Note the exact context: HTML text, attribute value, URL inside an attribute, inline script, JSON.
  3. Send a payload appropriate to that context. In HTML text, a tag that fires an event or a script tag; in an attribute, a value that breaks out of the quotes; in inline script, a string terminator followed by code. Watch for filtering that strips tags or encodes characters.
  4. Confirm execution in a real browser rather than relying on the payload appearing in the source. A reflection that is encoded, or that lands in a context where it cannot break out, is not a finding.
  5. Repeat without existing cookies and with a fresh session, since some pages only reflect on first visit or before state is loaded.

Common false positives: the payload appears but is HTML-encoded; the value lands inside a JavaScript string that is properly escaped; the reflection is inside a comment or an inert element; a browser-side filter or CSP blocks execution; or the input is only reflected after a round trip that the victim cannot be made to perform.

How it is fixed

Apply context-aware output encoding to every value written into a response, using the framework's escaping helpers rather than string concatenation. Where data must reach client-side JavaScript, serialise it safely (for example as JSON with proper escaping) instead of interpolating it into a script block. Validate input against an expected format where possible, for example restricting a location field to a known set of characters. Add a Content-Security-Policy that disallows inline script as defence in depth, and set cookies with HttpOnly so that script cannot read them.

Hunting notes

Reflected XSS tends to hide in parameters that pre-fill forms, carry redirect targets, hold search terms, or feed localisation and error messages. Signup, onboarding and password-reset flows are common because they render user-supplied context before a session exists. Recon signals include parameters that reappear in the HTML source, pages that echo the Referer or User-Agent, and endpoints that behave differently for first-time visitors.

Note any preconditions, such as the absence of a session cookie, so the triager can reproduce it reliably.

The original is short, so this covers everything it reports, then explains this kind of bug in general: how it works, how to test for it and how it is fixed. The general sections are about the bug class, not this target. Written with AI and checked against the original; the original is the record. 7 min read.

What happened, in plain words

Uber runs a website for its partners, the drivers and businesses that work with the company. One part of that site, partners.uber.com, has a signup page at /signup/global/ where a new partner can register. A security researcher named kirtixs found that this page would take a piece of text from the web address (the URL) and paste it into the page without cleaning it first. That kind of flaw is called reflected cross-site scripting, or XSS. Uber paid a bounty of 500.00 USD for the report, which was made public on 2016-03-24. The report gives no severity rating or CVSS score.

To understand the bug, you need two everyday ideas. First, a URL is the address you type into a browser, and everything after the ? is a set of parameters: little name and value pairs that the site can read. Think of them as notes handed to the page along with the request. Second, a cookie is a small piece of data the site stores in your browser so it can remember you between visits, like a cloakroom ticket that proves you already checked in. The researcher noticed the flaw only appeared when the browser had no cookie for partners.uber.com yet, meaning the visitor was brand new in that session.

The normal version of the page, with all its parameters, looked like this:

HTTP
https://partners.uber.com/signup/global/?referrer_uuid=21f5fbbd-b79f-4a16-9976-01096fb556c7&place_id=ChIJPaCKh-tmA4wR7JEkNDrNDSU&utm_source=twitter&location=Carolina%2C+Carolina%2C+Puerto+Rico&lat=18.3807819&lng=-65.95738719999997

Reading it piece by piece:

  • https://partners.uber.com/signup/global/ is the page being requested.
  • referrer_uuid, place_id and utm_source are identifiers the site uses to track where the visitor came from.
  • location=Carolina%2C+Carolina%2C+Puerto+Rico is the interesting one. It carries a place name. %2C is the encoded form of a comma and + stands for a space, so the value reads "Carolina, Carolina, Puerto Rico".
  • lat and lng are latitude and longitude coordinates.

The researcher then replaced the location value with something containing a script tag:

HTTP
https://partners.uber.com/signup/global/?place_id=ChIJPaCKh-tmA4wR7JEkNDrNDSU&location=Carolina<script>alert(1)</script>a%2C+Carolina"%2C+Puerto+Rico&lat=18.3807819&lng=-65.95738719999997

Here the location value is Carolina<script>alert(1)</script>a, Carolina", Puerto Rico. The <script> tag is a piece of HTML that tells the browser to run the JavaScript code between the opening and closing tags. alert(1) is the simplest possible JavaScript: it makes a small pop-up box appear with the number 1 in it. It does nothing harmful, but it proves that code supplied by the person who built the link is actually running inside the page.

The steps were:

  1. Open the signup page with the parameters above in a browser that has no existing cookie for partners.uber.com.
  2. Notice that the location value is written into the page without validation or sanitisation, meaning the site does not check or clean it.
  3. Put a script tag into the location value and confirm the script runs. The researcher tested this with Firefox 34.0 and saw the alert.

Why does the cookie condition matter? The researcher reports that the value is only reflected this way for a visitor who has not been to the page before in the current session. The report does not explain why the cookie condition matters. The report does not describe the fix that was applied.

In general, how this kind of bug works

Reflected XSS happens when a site takes something from the request and echoes it back into the page without encoding it. Encoding means converting special characters into a harmless form, so that < becomes &lt; and the browser shows it as text instead of treating it as the start of a tag. When the site skips that step, the browser cannot tell the difference between the site's own markup and markup an attacker supplied, so it runs the attacker's script as if the site had written it.

That script runs with the site's identity, called its origin (the combination of protocol, host and port). Browsers normally stop one website's code from reading another website's data, a rule known as the same-origin policy. Script running inside partners.uber.com is not blocked by that rule with respect to partners.uber.com, so it can read the page, use the visitor's cookies and make requests as that visitor. The report only demonstrates alert(1) and does not show a concrete attack beyond that.

In general, the mistake is easy to make because building a page by gluing strings together is convenient, and the same value can be safe in one spot and dangerous in another. A name placed between two tags is different from a name placed inside a <script> block or an unquoted attribute. The defences are output encoding matched to where the value lands, a Content-Security-Policy (a header that tells the browser which scripts may run), and treating every piece of request data as untrusted.

In general, testing for this looks like:

  1. Find every place request data appears in a response: parameters, parts of the path, headers such as Referer and User-Agent, and form fields echoed back on error pages.
  2. Send a harmless marker value and find it in the page source. Note exactly where it sits: plain text, an attribute, a URL, inline script or JSON.
  3. Send a payload suited to that spot, such as a tag that fires an event in plain text, or a quote that breaks out of an attribute.
  4. Confirm execution in a real browser. A payload that merely appears in the source, encoded or trapped in a context it cannot escape, is not a finding.
  5. Repeat with no cookies and with a fresh session, because some pages only reflect on a first visit.

Common false positives include a payload that is HTML-encoded, one stuck inside a properly escaped JavaScript string, one inside a comment or inert element, one blocked by a browser filter or CSP, or one that only appears after a step the victim cannot be made to take.

In general, the fix is context-aware output encoding on every value written into a response, using the framework's escaping helpers rather than string concatenation. Data that must reach client-side JavaScript should be serialised safely, for example as JSON, instead of being pasted into a script block. Input can be validated against an expected format, a Content-Security-Policy that forbids inline script adds defence in depth, and cookies set with HttpOnly cannot be read by script at all.

In general, reflected XSS tends to hide in parameters that pre-fill forms, carry redirect targets, hold search terms, or feed localisation and error messages. Signup, onboarding and password-reset flows are common because they render user-supplied context before a session exists. Useful signals are parameters that reappear in the page source, pages that echo the Referer or User-Agent, and endpoints that behave differently for first-time visitors.

Glossary

  • URL: the address of a page or resource on the web.
  • Parameter: a name and value pair after the ? in a URL that the site can read.
  • Cookie: a small piece of data a site stores in your browser to remember you between requests.
  • Session: the period during which a site recognises you as the same visitor, usually via a cookie.
  • Reflected XSS: a flaw where input from a request is echoed into the page without encoding, letting an attacker's script run.
  • Validation: checking that input matches an expected format.
  • Sanitisation: cleaning input so that dangerous characters or markup cannot take effect.
  • Encoding: converting special characters into a harmless form so the browser treats them as text.
  • HTML: the markup language that describes the structure of a web page.
  • Script tag: the HTML element that tells the browser to run the JavaScript inside it.
  • JavaScript: the programming language browsers run inside web pages.
  • alert(1): a JavaScript call that shows a pop-up box, often used to prove script execution.
  • Origin: the combination of protocol, host and port that identifies a site to the browser.
  • Same-origin policy: the browser rule that stops one site's code from reading another site's data.
  • Content-Security-Policy: a response header that restricts which scripts and resources a page may load.
  • HttpOnly: a cookie flag that hides the cookie from JavaScript.
  • JSON: a text format for structured data that can be safely embedded in a page.
  • CVSS: a standard scoring system for the severity of a vulnerability.
  • Bounty: a payment a company makes to a researcher who reports a valid security issue.

More by kirtixs

View all

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