Skip to content
XSS Disclosed report Beginner

Reflected XSS POST method at partners.uber.com

A reflected cross-site scripting flaw existed on partners.uber.com because user input in the request path was not properly validated. An attacker could send a POST request containing a script payload in the path, and the server would insert it directly into the response, causing the script to run in the victim's browser.

Seif Elsallamy Follow

Originally disclosed on HackerOne

Bounty$3,000 Medium View original
  • Triaged in 6 months
  • Fixed in 12 months
  • Paid in 12 months
  • Disclosed after 2.8 years

Summary by the program

A lack of proper input validation made it possible for an attacker to execute malicious JavaScript code on partners.uber.com. This reflected XSS would execute after making a POST request with an XSS payload in the path of the request. As a result, the server would directly insert the payload into the response, allowing the XSS to trigger on the page.

Thanks, @seifelsallamy!

Summary by the researcher

https://www.youtube.com/watch?v=5Gg4t3clwys

The original report as published on HackerOne, by seifelsallamy. 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 was partners.uber.com, a partner-facing site in Uber's programme on HackerOne. The researcher, seifelsallamy, found a reflected cross-site scripting issue that triggered through a POST request.

The mechanism, as the program's summary describes it, is that the XSS payload was placed in the path of the request. The server took that path content and inserted it directly into the response, so the payload ended up in the response and executed in the browser. The program attributes this to a lack of proper input validation.

The researcher documented the finding in a video walkthrough:

Or watch on YouTube
From the original on HackerOne

The report was rated medium severity and paid a bounty of 3,000 USD. It was disclosed on 25 January 2019. The report does not describe the exact endpoint, the payload string, or the fix that was applied.

Root cause

The program attributes the flaw to a lack of proper input validation on a value taken from the request path. Because the value is echoed into the HTML response without being escaped for its output context, the browser parses it as markup and script rather than as text.

Impact

The payload would execute as JavaScript on partners.uber.com after a POST request carrying it in the path. The report does not go into which actions or data were reachable, so the practical blast radius depends on what the partner site allowed an authenticated session to do.

How this kind of bug works

Reflected XSS happens when an application takes input from a request and writes it into a response without encoding it for the context where it lands. If the value ends up between HTML tags, an attacker can inject new elements; inside an attribute, they can break out of the quoting; inside a script block, they can inject JavaScript directly. The browser has no way to tell developer-written markup from injected markup, so it executes whatever parses as code.

POST-based reflection is a variant worth understanding. Testers often assume only query strings reflect, but frameworks frequently route on the path, and error pages, redirects and 404 handlers often echo the requested path back to the user. A POST to a path that does not exist, or to a handler that reports the path in its response, can therefore reflect a payload even though the body is ignored.

Input validation helps but is secondary; correct output encoding is what actually stops execution.

How to test for it

  1. Map the surface. Identify endpoints that echo something back: search results, error pages, redirect notices, file-not-found handlers, and any route that includes a path segment in its response.
  2. Send a benign marker first. Put a unique alphanumeric string in the path segment or parameter and confirm it appears verbatim in the response body. This tells you reflection exists before you worry about execution.
  3. Probe the context. Look at where the marker lands: between tags, inside an attribute, inside a script, inside a URL. The context determines which characters matter.
  4. Try the method the application actually uses. If a form submits by POST, replay the request as a POST with the payload in the path or body, and check whether the response still reflects it. Do not assume GET-only.
  5. Confirm execution in a real browser, not just by string matching. A payload that appears in the HTML but is neutralised by encoding is not a finding.

Common false positives: the marker appears but is HTML-encoded, so it renders as text; the reflection lands in a context where the browser will not execute it, such as inside a comment or a non-scriptable attribute; the payload only fires in the tester's own browser because of a client-side sink that never reaches the server; or the response is served with a content type that prevents HTML parsing.

How it is fixed

Apply context-aware output encoding to every value written into a response, including the request path. Reject or normalise path segments that contain characters with no legitimate use there. Add a Content-Security-Policy that disallows inline script and restricts script sources, which limits the damage of any encoding mistake that slips through. Set the correct Content-Type and X-Content-Type-Options: nosniff so responses are not interpreted as HTML when they should not be.

Hunting notes

Path-based reflection hides in places testers skip: custom 404 pages, router error handlers, language or locale prefixes, and redirect endpoints that quote the original URL. Recon signals worth watching are frameworks that build error pages from the request URI, single-page apps whose server-side fallback echoes the path, and any endpoint that returns the requested path in a debug or status message.

When you report, show the full request and the exact response excerpt where the payload lands, plus a browser screenshot or recording proving execution. State which method was used and why the reflection survives encoding. If the impact is limited to self-XSS or requires unusual browser behaviour, say so plainly; programs reject reports that overstate what a payload can do.

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 at partners.uber.com for its business partners. A security researcher named seifelsallamy found a flaw there that let an attacker run their own JavaScript code inside that site, in the browser when the crafted request was made.

To understand the flaw, start with two everyday ideas. A request is what your browser sends to a web server when you click a link or submit a form: it is a message asking for a page or asking the server to do something. A response is what the server sends back, usually the HTML that makes up the page you see. HTML is the language that describes a page: headings, paragraphs, links, and also scripts, which are small programs the browser runs.

The bug is called reflected cross-site scripting, or reflected XSS. "Cross-site scripting" means getting your own JavaScript to run as if it were part of someone else's website. "Reflected" means the malicious code travels in the request and bounces straight back in the response, like a shop assistant repeating back whatever a customer says. If the customer says something rude, the shop repeats it to the next person in line.

Here the payload, meaning the piece of code the attacker wants to run, was placed in the path of the request. The path is the part of a web address after the site name, for example the /account/settings in https://example.com/account/settings. The server took whatever was in that path and pasted it directly into the page it sent back. Because the server did not properly validate that text, it inserted it directly into the response.

The program's own summary puts the cause down to a lack of proper input validation: the server accepted input it should have rejected or neutralised. The researcher recorded a video walkthrough of the finding:

Or watch on YouTube
From the original on HackerOne

The report was rated medium severity and paid a bounty of 3,000 USD. It was disclosed on 25 January 2019. The report does not give the exact address that was affected, the exact payload used, or the fix that was applied.

Why the POST detail matters

Most people meet web forms that send data in one of two ways. A GET request puts the data in the address itself, after a question mark, which is why you sometimes see long messy URLs. A POST request puts the data in the body of the message instead, out of sight in the address bar. Testers often assume only GET requests can reflect a payload, because the data is visible in the URL. This report shows the opposite: the payload sat in the path, and the request was a POST. The method changes how the request is delivered, not whether the reflection is dangerous.

What an attacker could do

The malicious JavaScript would execute on partners.uber.com. The report does not say which actions or data were actually reachable, so how much damage was possible depends on what a logged-in partner account was allowed to do.

In general, how this kind of bug works

Reflected XSS happens when a site takes something from a request and writes it into a response without encoding it for where it lands. Encoding means converting special characters into harmless equivalents, so that < becomes something the browser displays as text rather than treats as the start of an HTML tag. The browser cannot tell markup written by the site's developers from markup injected by an attacker. Whatever parses as code, it runs.

Where the value lands decides which characters matter. Between HTML tags, an attacker can add new elements. Inside an attribute, they can break out of the quotes. Inside a script block, they can add JavaScript directly.

POST-based reflection is easy to miss. Frameworks often build pages from the request path, and error pages, redirect notices and "page not found" handlers frequently repeat the requested path back to the user. A POST to a path that does not exist, or to a handler that reports the path in its response, can therefore reflect a payload even when the body of the request is ignored.

Input validation helps, but correct output encoding is what actually stops code from running.

How to test for it

  1. Find the places that echo something back: search results, error pages, redirect notices, page-not-found handlers, and any route that includes part of the path in its response.
  2. Send a harmless marker first, such as a unique string of letters and digits, in the path or a parameter. If it appears unchanged in the response, reflection exists. This step matters because it separates "the site repeats my input" from "the site runs my input".
  3. Look at where the marker lands. Between tags, inside an attribute, inside a script, inside a URL: the context tells you which characters to care about.
  4. Use the method the site actually uses. If a form submits by POST, replay it as a POST with the payload in the path or body and check whether the response still reflects it. Do not assume GET only.
  5. Confirm execution in a real browser, not just by matching text. A payload that appears in the HTML but is neutralised by encoding is not a finding.

Common false positives: the marker appears but is HTML-encoded, so it shows as text; the reflection lands somewhere the browser will not execute, such as inside a comment; the payload only fires in the tester's own browser because of client-side code that never reaches the server; or the response has a content type that stops the browser parsing it as HTML.

How it is fixed

Apply context-aware output encoding to every value written into a response, including the request path. Reject or normalise path segments containing characters with no legitimate use there. Add a Content-Security-Policy that disallows inline script and restricts where scripts can load from, which limits the damage of any encoding mistake that slips through. Set the correct Content-Type and X-Content-Type-Options: nosniff so responses are not interpreted as HTML when they should not be.

Where to look when hunting

Path-based reflection hides in places testers skip: custom page-not-found pages, router error handlers, language or locale prefixes in the path, and redirect endpoints that quote the original address. Signals worth watching are frameworks that build error pages from the request address, single-page apps whose server-side fallback echoes the path, and any endpoint that returns the requested path in a debug or status message.

When reporting, show the full request and the exact part of the response where the payload lands, plus a screenshot or recording proving it ran. State which method was used and why the reflection survives encoding. If the impact is limited to self-XSS, where only the person who enters the payload is affected, or needs unusual browser behaviour, say so plainly; programmes reject reports that overstate what a payload can do.

Glossary

  • Request: the message a browser sends to a server asking for a page or an action.
  • Response: the message a server sends back, usually the HTML of a page.
  • HTML: the language that describes the structure and content of a web page.
  • JavaScript: a programming language that browsers run, used to make pages interactive.
  • XSS (cross-site scripting): a flaw that lets an attacker's JavaScript run as part of someone else's website.
  • Reflected XSS: XSS where the malicious code travels in the request and is echoed back in the response.
  • Payload: the piece of code an attacker wants the target to run.
  • Path: the part of a web address after the site name, such as /account/settings.
  • GET: a request method that puts data in the address, after a question mark.
  • POST: a request method that puts data in the body of the message rather than the address.
  • Input validation: checking that data coming into a site is acceptable and rejecting or cleaning what is not.
  • Encoding (output encoding): converting special characters so the browser shows them as text instead of treating them as code.
  • Content-Security-Policy: a response header that tells the browser which scripts and sources are allowed.
  • Content-Type: a response header stating what kind of content is being sent, such as HTML or plain text.
  • X-Content-Type-Options: nosniff: a header that stops the browser guessing a different content type from the one declared.
  • Bounty: a payment a company makes to a researcher who reports a valid security flaw.
  • Severity: a rating of how serious a flaw is, here medium.
  • Self-XSS: a case where only the person who enters the payload is affected, not other users.

More by Seif Elsallamy

View all

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