Reflected XSS on multiple uberinternal.com domains
The base parameter of the /oidauth/prompt endpoint on several uberinternal.com subdomains was reflected into the page body without sanitisation, allowing reflected cross-site scripting. Because the pages also lacked clickjacking protection, an attacker could trick a victim into clicking to trigger the script.
Originally disclosed on HackerOne
- Paid in 2 months
- Disclosed after 8 months
Summary by the program
The base parameter of /oidauth/prompt on multiple uberinternal.com subdomains was not sanitized before being reflected into the page body, making it vulnerable to reflected XSS. Additionally, these pages were affected by a clickjacking vulnerability that made exploitation easier, since a click was required to trigger the XSS.
Summary by the researcher
https://blog.fadyothman.com/how-i-discovered-xss-that-affects-over-20-uber-subdomains/
What the report shows
The target was a set of pages on multiple uberinternal.com subdomains, specifically the /oidauth/prompt endpoint. The feature of interest is the base parameter, which the application reflected into the page body.
According to the program's summary, the base parameter was not sanitised before being reflected into the page body, which made the endpoint vulnerable to reflected cross-site scripting. The same pages were also affected by a clickjacking weakness, and the program notes that this made exploitation easier because a click was required to trigger the XSS.
The researcher's own summary is a single link to a blog post. The report text itself does not include the individual requests, payloads or responses used during testing, so there is no code to reproduce here.
The report was rated medium severity and a bounty of 2,000 USD was awarded. It was disclosed on 13 November 2018. The text does not describe the fix that was applied.
Root cause
The mistake the report points to is a missing output encoding step: the value of the base parameter was written into the HTML body without sanitisation, so any markup or script syntax in the parameter would be interpreted by the browser as part of the page rather than as inert text. The report states this directly for the base parameter on /oidauth/prompt.
The clickjacking issue is a separate weakness on the same pages. Because triggering the XSS required a user click, the clickjacking weakness made exploitation easier. The report does not explain the exact framing setup.
Impact
The report describes reflected XSS on the affected pages, with a click required to trigger it. The program's summary frames the clickjacking weakness as making exploitation easier.
The report does not enumerate which subdomains were affected beyond saying there were multiple, nor does it describe what data or actions were reachable from the injected script. The severity assigned was medium.
How this kind of bug works
Reflected XSS arises when an application takes a value from the request and places it into the response without context-appropriate encoding. The browser parses the response as HTML, so characters that are meaningful to the HTML parser, or to the JavaScript parser inside a script context, change the structure of the document instead of appearing as data. Because the script executes with the origin of the vulnerable site, it can read and act on anything that origin is authorised to access.
The usual defences are output encoding matched to the context (HTML entity encoding in element bodies and attribute values, JavaScript encoding inside script blocks, URL encoding in URL contexts), combined with input validation where a value has a known shape. A Content Security Policy that disallows inline and untrusted script sources reduces the damage when encoding fails. For the clickjacking half, X-Frame-Options or a frame-ancestors directive in CSP prevents the page from being framed by other origins.
How to test for it
- Map parameters that are echoed back into the response. Authentication and authorisation flows are good candidates because they often carry a return URL or a base path that is rendered into a link or a form.
- Send a benign marker value and locate every place it appears in the response body, including attributes, script blocks and inline event handlers.
- Determine the parsing context at each reflection point, then send a payload appropriate to that context and observe whether the browser executes it. A positive result is script running in the page's origin, confirmed in a real browser rather than by string matching alone.
- Check whether the page can be framed, since a click requirement can be satisfied through clickjacking.
Common false positives: the marker appears only inside an encoded context and is displayed literally; the payload is reflected but the response is served with a content type the browser will not render as HTML; a filter strips the dangerous characters but the raw string still appears in the source; or the reflection happens in a context where the browser does not execute, such as inside a comment or a textarea that is never broken out of. Always confirm execution in a browser.
How it is fixed
Encode output according to the context in which the value is placed, and prefer allow-list validation for parameters such as a base path that should only contain a known set of characters. Set a restrictive Content Security Policy. Add X-Frame-Options: DENY or SAMEORIGIN, or a CSP frame-ancestors directive, to stop framing. Where a redirect or base value is genuinely needed, validate it against expected values rather than reflecting it verbatim.
Hunting notes
Reflected XSS tends to hide in parameters that are rendered into the page for convenience: return URLs, base paths, language and theme selectors, error messages that echo input, and search terms. Authentication endpoints are worth attention because they frequently carry a destination parameter through a login prompt.
Recon signals include parameters whose names suggest a path or URL (base, return, next, redirect), pages that render a link built from request data, and applications that reflect input into attributes rather than element bodies. A missing X-Frame-Options header on the same page is a hint that the click requirement can be bypassed.
What happened, in plain words
This report is about a security weakness on several internal websites belonging to Uber, all of them under the domain uberinternal.com. The pages sit under the domain uberinternal.com.
The specific page involved is at the path /oidauth/prompt. Think of a web address as a street address: the domain is the street, and the path is the building on it.
The page accepted a value in a parameter called base. A parameter is the part of a web address after a question mark, carrying small pieces of information to the page, like the options you tick on a form before handing it in. The page took whatever was in base and placed it directly into the body of the page it sent back. The program's summary says this value was not sanitised first. Sanitising means cleaning input so that anything dangerous in it is neutralised before it is used.
Because the value went in uncleaned, the page was vulnerable to reflected cross-site scripting, usually shortened to XSS. In an XSS attack, an attacker crafts a web address containing code, and when a victim opens that address, the victim's own browser runs the attacker's code as if it belonged to the trusted site. "Reflected" means the malicious value travels in the request and is bounced straight back in the response, rather than being stored on the server for later.
The same pages had a second problem: clickjacking. Clickjacking is when an attacker loads a real page inside an invisible frame on their own site, so that when the victim thinks they are clicking something harmless, they are actually clicking a button on the hidden page underneath. The program's summary explains why this mattered here: triggering the XSS required a click from the victim, and clickjacking made it easy to obtain that click without the victim realising what they were doing. The program's summary says the clickjacking weakness made exploitation easier.
The researcher's own summary in the report is just a link to a blog post. The report itself does not include the individual requests, payloads or responses used during testing, so there is no code to reproduce here.
The report was rated medium severity, a bounty of 2,000 USD was paid, and it was disclosed on 13 November 2018. The report does not describe the fix that was applied.
In general, how this kind of bug works
Reflected XSS happens when a website takes a value from the request and drops it into the page it returns without encoding it for the place it lands. Encoding is the act of converting special characters into harmless stand-ins, so that a < meant as text is not mistaken for the start of an HTML tag. A useful comparison is a comment box on a form: if you type a word that happens to look like a formatting instruction, the form should show it as plain text, not obey it.
Browsers read every response as a set of instructions: HTML for structure, JavaScript for behaviour. The attacker's script then runs with the origin of the vulnerable site. Origin means the combination of scheme, host and port, and it is the boundary browsers use to decide which site's data a script may touch. Script running in the site's origin can read and act on anything that site is allowed to access.
The standard defences are output encoding matched to context (HTML encoding in page bodies and attributes, JavaScript encoding inside script blocks, URL encoding in links), input validation where a value has a known shape, and a Content Security Policy, a header that tells the browser which script sources are allowed. For the clickjacking half, the X-Frame-Options header or a frame-ancestors directive in the Content Security Policy stops other sites from framing the page.
In general, how to test for it
- Find parameters that get echoed back into the response. Login and authorisation flows are good candidates, because they often carry a destination or base path that is rendered into a link or form.
- Send a harmless marker value and find every place it appears in the response, including attributes, script blocks and inline event handlers.
- Work out the parsing context at each reflection point, then send a payload suited to that context and watch whether the browser executes it. A real positive is script running in the page's origin, confirmed in a browser, not just a string match in the source.
- Check whether the page can be framed, since a click requirement can be satisfied through clickjacking.
Common false positives: the marker appears only in an encoded context and is shown literally; the payload is reflected but the response has a content type the browser will not render as HTML; a filter strips the dangerous characters but the raw string still shows in the source; or the reflection lands somewhere the browser does not execute, such as inside a comment or a textarea that is never broken out of. Always confirm execution in a browser.
In general, how it is fixed
Encode output according to where the value is placed, and prefer allow-list validation for parameters such as a base path that should only contain a known set of characters. Set a restrictive Content Security Policy. Add X-Frame-Options: DENY or SAMEORIGIN, or a CSP frame-ancestors directive, to stop framing. Where a redirect or base value is genuinely needed, validate it against expected values rather than reflecting it verbatim.
In general, where to look
Reflected XSS tends to hide in parameters rendered into the page for convenience: return URLs, base paths, language and theme selectors, error messages that echo input, and search terms. Authentication endpoints deserve attention because they frequently carry a destination parameter through a login prompt.
Reconnaissance signals include parameter names that suggest a path or URL (base, return, next, redirect), pages that build a link from request data, and applications that reflect input into attributes rather than page bodies. A missing X-Frame-Options header on the same page is a hint that the click requirement can be bypassed.
Glossary
- Parameter: a named value passed to a page in the web address, after a question mark.
- Endpoint: a specific path on a site that handles a particular request.
- Sanitisation: cleaning input so dangerous content is neutralised before use.
- Encoding: converting special characters into harmless stand-ins so they are treated as text.
- Reflected XSS: cross-site scripting where the malicious value travels in the request and is echoed straight back in the response.
- Cross-site scripting (XSS): running attacker-supplied script in a victim's browser under a trusted site's origin.
- Clickjacking: hiding a real page in an invisible frame so a victim's click lands on something they did not intend.
- Origin: the scheme, host and port combination that browsers use as a security boundary.
- Content Security Policy (CSP): a response header restricting which script sources a page may load.
X-Frame-Options: a response header that controls whether a page may be framed by other sites.frame-ancestors: a CSP directive that lists which sites may frame the page.- Allow-list validation: accepting only values from a known set of permitted characters or options.
- False positive: a test result that looks like a vulnerability but is not exploitable.
- Proof of concept: a minimal demonstration that the vulnerability can actually be triggered.
- Severity: a rating of how serious a vulnerability is.
- Bounty: a payment made to a researcher for a valid report.