Skip to content
XSS Disclosed report Intermediate

Probably unexploitable XSS via Header Injection

The Who-Platform header is reflected unescaped in an error page, allowing script injection. An attacker could potentially execute script in a victim's browser, though the report notes this is likely no longer exploitable in modern browsers.

d0nut Follow

Originally disclosed on HackerOne

  • Triaged in 13 hours
  • Fixed in 42 hours
  • Disclosed after 9 months

Summary by the program

The Who-Platform header is reflected in the output of the page if it's not one of the recognized Who-Platform values (IOS, ANDROID, WEB).

While this is probably no longer exploitable (as of ~2015), it may be exploitable on less well implemented browsers (not Chrome/Firefox/Edge). In general, though, this is bad form and should probably be corrected.

Fixed with: https://github.com/WorldHealthOrganization/app/pull/855

The report

Summary:

The Who-Platform header is reflected in the output of the page if it's not one of the recognized Who-Platform values (IOS, ANDROID, WEB). While this is probably no longer exploitable (as of ~2015), it may be exploitable on less well implemented browsers (not Chrome/Firefox/Edge). In general, though, this is bad form and should probably be corrected.

Steps To Reproduce:

Send the following to hackerone.whocoronavirus.org

POST /WhoService/getCaseStats HTTP/1.1
Host: hackerone.whocoronavirus.org
Who-Client-ID: ██████
Who-Platform: test1<script>alert(1)</script>
Content-Length: 0

Observe the response containing an XSS payload.

HTTP/1.1 400 Bad Request
Content-Type: text/html;charset=utf-8
X-Cloud-Trace-Context: 587c4577619ec099323490092d00ca47;o=1
Date: Wed, 01 Apr 2020 04:14:02 GMT
Server: Google Frontend
Content-Length: 302

<html><head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<title>400 Unsupported Who-Platform header: test1<script>alert(1)</script></title>
</head>
<body text=#000000 bgcolor=#ffffff>
<h1>Error: Unsupported Who-Platform header: test1<script>alert(1)</script></h1>
</body></html>

Exploitation of this kind of XSS vector was possible using flash but somewhat recently a security upgrade prevented flash from being able to set arbitrary custom headers in cross origin POST requests.

Supporting Material/References:

██████████

Impact

Very very limited XSS.

This probably moreso falls in the "Media could be a stickler about this" but it also could affect real world participants on out-of-date browsers or out-of-date version of flash.

The original report as published on HackerOne, by d0nut. 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 application reflects the Who-Platform header value into an HTML error page without encoding it.

Impact

Very limited XSS; it may only affect out-of-date browsers or Flash, and is probably not exploitable in modern browsers.

What the attacker needed

Victim uses an outdated browser or Flash; attacker can set custom headers cross-origin

The fix

The issue was fixed by a pull request.

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.

When a website takes input from a request and puts it directly into a web page without cleaning it, an attacker can insert their own code. Here, a custom header value is echoed back in an error message, so a script tag could run if a browser allowed it. Modern browsers block this kind of cross-origin header injection, so the risk is low.

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 d0nut

View all

2 more disclosed reports, best first.

More from WHO COVID-19 Mobile App

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.