Reflected XSS on www.hackerone.com and resources.hackerone.com
A reflected cross-site scripting vulnerability was found on two HackerOne marketing sites, where a crafted URL parameter could inject a script that executes in the victim's browser. An attacker could use this to run arbitrary JavaScript in the context of the affected sites.
Originally disclosed on HackerOne
- Triaged in 7 hours
- Fixed in 23 days
- Paid in 5 days
- Disclosed after 30 days
Good day :)
I hope your doing as well as can be during these difficult times.
I have found xss at 2 endpoints:
https://www.hackerone.com/resources/
and
https://resources.hackerone.com
The payloads that work are here:
https://www.hackerone.com/resources/read/embed_mini/11690/122736?miniPop=false&alwaysCover=false&miniTitle=XSS+POC&miniColor=333333&miniLinkToTitle=true&miniUrl=http://example.com%22%22,})%3C/script%3E%3Csvg+onload=confirm(location)%3E&miniBg=FFFFFF&hideBg=true&width=380&height=330&sharing=true
https://resources.hackerone.com/resources/read/embed_mini/11690/122736?miniPop=false&alwaysCover=false&miniTitle=XSS+POC&miniColor=333333&miniLinkToTitle=true&miniUrl=http://example.com%22%22,})%3C/script%3E%3Csvg+onload=confirm(location)%3E&miniBg=FFFFFF&hideBg=true&width=380&height=330&sharing=true
I've attached screenshots, the xss is intermittent, I'm not sure why maybe a cookie, maybe ip blocking, I'm not sure, but it happens :)
If it helps for others I have no idea what I am doing most of the time and brute force try things until they work :)
Always learning, always feeling I know so little, and so much to learn, its awesome working together we all contribute our knowledge and effort :)
I've been taking a break the last few weeks to help to support family in this time of need, any bounty that is awarded I'm adding hackforgood as a collaborator and donating 100% of the bounty.
It is great that hackerone is implementing this option to let us if we are in the position to share to donate funds, we have the option via the platform :)
It was shared with me that "You can add hackforgood as a collaborator on your reports and weight your bounty percentage on how much you’d like to donate. Our team will submit donations at the end of each month to WHO’s Covid-19 Response Fund" hope it works here will give it a shot :)
As always I wish you well on your side of the screen, to your loved ones, and that you can find both mental and physical wellness as much as possible right now :)
-Eric
Impact
xss on the site, low risk since a marketing site :)
Attachments


Context
The target is HackerOne's own marketing presence: the main site at www.hackerone.com and the separate resources site at resources.hackerone.com. Both expose a resource reader, and both serve an embedded mini player under the path /resources/read/embed_mini/. The mini player takes a set of query parameters, including a title, a title colour, a link target, a background colour, a width, a height and several boolean-looking options.
That is the feature under test: a parameterised embed view that renders a title and a link from values supplied in the URL.
Setup
No accounts, roles or special tooling are described. The report does not describe the tooling used; the payload is delivered through the embed URL's query string. The only precondition worth noting is stated in the report itself: the XSS is intermittent. The researcher was not sure why, suggesting it might depend on a cookie or on IP blocking, but did not establish the cause.
Finding it
The researcher reports reflected XSS at two endpoints:
https://www.hackerone.com/resources/
and
https://resources.hackerone.com
The reasoning given is candid: the researcher describes brute forcing things until they worked rather than following a specific lead. The researcher describes brute forcing things until they worked rather than following a specific lead.
Exploitation
Step 1: build the payload into the embed URL
The working payload is delivered entirely through the query string of the embed_mini endpoint. The same URL works against both hosts, with only the hostname changed.
https://www.hackerone.com/resources/read/embed_mini/11690/122736?miniPop=false&alwaysCover=false&miniTitle=XSS+POC&miniColor=333333&miniLinkToTitle=true&miniUrl=http://example.com%22%22,})%3C/script%3E%3Csvg+onload=confirm(location)%3E&miniBg=FFFFFF&hideBg=true&width=380&height=330&sharing=true
https://resources.hackerone.com/resources/read/embed_mini/11690/122736?miniPop=false&alwaysCover=false&miniTitle=XSS+POC&miniColor=333333&miniLinkToTitle=true&miniUrl=http://example.com%22%22,})%3C/script%3E%3Csvg+onload=confirm(location)%3E&miniBg=FFFFFF&hideBg=true&width=380&height=330&sharing=true
The important parts:
miniTitle=XSS+POCsets the title parameter toXSS POC.miniLinkToTitle=trueis one of the embed options sent alongside the payload.miniUrlcarries the actual break-out. The value starts with a benignhttp://example.com, then closes the surrounding string and structure with%22%22,})(decoded:"",})), then closes the script block with%3C/script%3E(</script>), and finally injects an SVG element with an event handler:%3Csvg+onload=confirm(location)%3E(<svg onload=confirm(location)>).- The remaining parameters (
miniPop,alwaysCover,miniColor,miniBg,hideBg,width,height,sharing) are also part of the URL.
Step 2: observe execution
The payload ends with </script> followed by <svg onload=confirm(location)>. Its onload handler fires and calls confirm(location), showing the current URL in a dialog. That is the proof of execution: arbitrary JavaScript running in the origin of the marketing site.
The researcher notes the behaviour is intermittent and did not determine the cause, speculating about a cookie or IP blocking.
Step 3: capture evidence
Two screenshots were attached.


Root cause
The report does not include the server-side or client-side code, so the exact mistake is not shown. The report does not include the code, so the exact mistake is not shown. Because the value is reflected from the query string, the injected markup executes in the page's origin.
Why existing defences did not stop it is not stated in the report.
Impact
The researcher rates this as low risk, explicitly because it is a marketing site. The demonstrated effect is a confirm(location) dialog firing from the crafted URL on both hosts. The report does not describe any specific data, session or account that could be reached from those origins.
Fix
Variants to test
- Other embed parameters: try the same break-out in
miniTitle,miniColor,miniBgand the numeric parameters (width,height). A positive result is the sameconfirm(location)firing, or any reflected value appearing unencoded in the page source. - Both hosts: the report lists the same payload URL for
www.hackerone.comandresources.hackerone.com. - Link context without script: set
miniLinkToTitle=trueand put ajavascript:URL or an attribute break-out inminiUrl. A positive result is a clickable link that executes script or an injected attribute that fires. - Intermittency: repeat the request with and without cookies, and from different source addresses, to see whether the reflection depends on either. A positive result is a reliable reproduction under one condition and not the other.
Hunting notes
This kind of bug tends to hide in parameterised embed and widget endpoints, where many query values are stitched into HTML and inline JavaScript to configure appearance and behaviour. During recon, look for paths containing embed, widget, mini or read, and for parameters whose names suggest they end up in a link or a script (url, link, title, color, width, height). A quick signal is that a parameter value appears verbatim in the response source, especially inside a <script> block or an href.
What happened, in plain words
HackerOne runs two public websites: the main marketing site at www.hackerone.com and a separate resources site at resources.hackerone.com. Both of them serve an embedded mini player under the path /resources/read/embed_mini/. The way that box is configured is by putting settings into the web address itself, after a question mark. Those settings are called query parameters.
The researcher found reflected XSS at two endpoints. By putting a carefully crafted value into the web address, it is possible to make the page run JavaScript code of the attacker's choosing. This class of bug is called reflected cross-site scripting, or reflected XSS. "Reflected" means the bad value is not stored on the server; it travels in the link, is echoed back into the page, and runs in the visitor's browser. "Cross-site scripting" means an attacker gets their own script to run as if it came from the trusted site.
The proof was simple: a pop-up dialog showing the current page address. The researcher rated it low risk because these are marketing sites.
Background you need first
A few ideas come up again and again below, so here they are from zero.
- A web address and its query string. When you see
https://example.com/page?name=value&other=thing, everything after the?is the query string. It is a list of settings sent to the server, separated by&. Each setting has a name and a value. Servers commonly read these values and use them to decide what to show. - URL encoding. Some characters cannot appear literally in a web address, so they are written as a percent sign followed by two hex digits. For example
%22means a double quote",%3Cmeans<,%3Emeans>, and+often means a space. When the server reads the value, it decodes these back into the real characters. This matters because an attacker can hide dangerous characters like<and"inside a link that looks fairly ordinary. - HTML and JavaScript. A web page is written in HTML: tags like
<p>for a paragraph,<a>for a link,<script>for a block of JavaScript code. JavaScript is the programming language that runs inside your browser and makes pages interactive. A<script>block runs code; an HTML tag with anonloadattribute (for example<svg onload=...>) runs code when that element finishes loading. - XSS (cross-site scripting). If a website takes something a visitor supplied and puts it into the page without cleaning it, the visitor can supply HTML or JavaScript instead of plain text. The browser cannot tell the difference and runs it, believing it came from the trusted site. That is XSS.
- Reflected XSS. The malicious input is not saved on the server. It is reflected: it goes out in the request and comes straight back in the response. The victim has to open a crafted link for it to fire.
- Origin. An origin is the combination of scheme (http or https), hostname and port. Scripts running in one origin are treated as belonging to that site. If an attacker can run script in the origin of
www.hackerone.com, the browser treats that script as part ofwww.hackerone.com. - Cookie. A small piece of data a website asks your browser to store and send back on every request to that site. Cookies are often used to remember who you are (a login session). They are one reason XSS is serious: script running in a site's origin may be able to act with your logged-in identity.
- API. A way for one piece of software to talk to another, usually over the web, exchanging data in a defined format. You do not need one here, but the term appears in security discussions around web features.
- Content Security Policy (CSP). A rule set a website can send to the browser saying which scripts are allowed to run. A strict policy can stop injected inline scripts from executing. It is a safety net, not a fix.
- Marketing site. A public website whose job is to describe a company and its products, rather than to hold customer accounts or sensitive data. That is why the researcher called the risk low.
The feature under test
The target is HackerOne's own marketing presence: the main site at www.hackerone.com and the separate resources site at resources.hackerone.com. Both expose a resource reader, and both serve an embedded mini player under the path /resources/read/embed_mini/.
The mini player takes a set of query parameters that control how the embed behaves and how it looks: whether it pops up, whether a cover is always shown, the title, the title colour, whether the title links, the link target, the background colour, whether the background is hidden, the width, the height and whether sharing is enabled.
That is the feature under test: a parameterised embed view that renders a title and a link from values supplied in the URL. In everyday terms, it is a small box you can drop on a page, and you tell the box what to show by writing instructions into the link that loads it.
Setup
No accounts, roles or special tooling are described. The report does not describe the tooling used; the payload is delivered through the embed URL's query string. The only precondition worth noting is stated in the report itself: the XSS is intermittent. The researcher was not sure why, suggesting it might depend on a cookie or on IP blocking, but did not establish the cause.
"Intermittent" means it did not fire every single time. For a beginner, the lesson is that a bug that only sometimes appears is still a bug; you note the uncertainty honestly rather than pretending it is reliable.
Finding it
The researcher reports reflected XSS at two endpoints:
https://www.hackerone.com/resources/
and
https://resources.hackerone.com
An endpoint is simply a specific address on a server that does something. These two lines are the two sites where the problem was found.
The reasoning given is candid: the researcher describes brute forcing things until they worked rather than following a specific lead. Brute forcing here means trying many variations by hand until something interesting happened. The researcher describes brute forcing things until they worked rather than following a specific lead. In other words, the box copies settings from the web address into the page it builds, and one of those settings ends up in a place where a link is created.
Exploitation
Step 1: build the payload into the embed URL
The working payload is delivered entirely through the query string of the embed_mini endpoint. The same URL works against both hosts, with only the hostname changed.
https://www.hackerone.com/resources/read/embed_mini/11690/122736?miniPop=false&alwaysCover=false&miniTitle=XSS+POC&miniColor=333333&miniLinkToTitle=true&miniUrl=http://example.com%22%22,})%3C/script%3E%3Csvg+onload=confirm(location)%3E&miniBg=FFFFFF&hideBg=true&width=380&height=330&sharing=true
https://resources.hackerone.com/resources/read/embed_mini/11690/122736?miniPop=false&alwaysCover=false&miniTitle=XSS+POC&miniColor=333333&miniLinkToTitle=true&miniUrl=http://example.com%22%22,})%3C/script%3E%3Csvg+onload=confirm(location)%3E&miniBg=FFFFFF&hideBg=true&width=380&height=330&sharing=true
Line by line, in plain words:
https://www.hackerone.com/resources/read/embed_mini/11690/122736is the address of the mini player. The numbers11690and122736identify which resource the player should show. The?starts the settings list.miniPop=falsesays the player should not pop up.alwaysCover=falsesays a cover image should not always be shown.miniTitle=XSS+POCsets the title parameter toXSS POC.miniColor=333333is one of the embed options sent alongside the payload.miniLinkToTitle=trueis one of the embed options sent alongside the payload.miniUrl=http://example.com%22%22,})%3C/script%3E%3Csvg+onload=confirm(location)%3Ecarries the actual break-out. Decoded, it ishttp://example.com"",})</script><svg onload=confirm(location)>. It starts with a harmlesshttp://example.com, then closes the surrounding string and structure with"",}), then closes the script block with</script>, and finally injects an SVG element with an event handler:<svg onload=confirm(location)>.miniBg=FFFFFFis one of the embed options sent alongside the payload.hideBg=trueis one of the embed options sent alongside the payload.width=380&height=330are two more embed options in the URL.sharing=trueis one of the embed options sent alongside the payload.
The remaining parameters (miniPop, alwaysCover, miniColor, miniBg, hideBg, width, height, sharing) are also part of the URL.
Step 2: observe execution
The payload ends with </script> followed by <svg onload=confirm(location)>. Its onload handler fires and calls confirm(location), showing the current URL in a dialog. That is the proof of execution: arbitrary JavaScript running in the origin of the marketing site.
In plain words: the page was in the middle of writing out a piece of JavaScript that builds the title link. The attacker's value said "stop the script here" with </script>, and then added a new piece of HTML, an SVG image, that runs code the moment it loads. That code, confirm(location), opens a yes/no dialog showing the page address. It is harmless on purpose: it proves code ran without doing anything destructive.
The researcher notes the behaviour is intermittent and did not determine the cause, speculating about a cookie or IP blocking. A cookie is a small piece of data your browser stores for a site and sends back with each request; IP blocking means the server refusing requests from certain network addresses. Either could explain why the same link sometimes worked and sometimes did not.
Step 3: capture evidence
Two screenshots were attached.


Screenshots matter because a report is a claim, and a claim needs evidence.
Root cause
The report does not include the server-side or client-side code, so the exact mistake is not shown. The report does not include the code, so the exact mistake is not shown. Because the value is reflected from the query string, the injected markup executes in the page's origin.
Why existing defences did not stop it is not stated in the report. "Context-aware escaping" means converting characters like ", < and > into safe forms depending on where the value will appear (inside a string, inside a tag, inside a link). "Inline script" means JavaScript written directly in the page rather than loaded from a separate file.
Impact
The researcher rates this as low risk, explicitly because it is a marketing site. The demonstrated effect is a confirm(location) dialog firing from the crafted URL on both hosts. The report does not describe any specific data, session or account that could be reached from those origins.
In everyday terms: an attacker could send someone a link. If that person clicked it, the attacker's code would run as if it were part of HackerOne's site. What that code could actually do depends on what the site offers in that origin; the report does not claim any particular prize, which is why it is rated low.
Fix
In plain words: treat everything from the address as text, never as code. Convert the dangerous characters into harmless equivalents before putting them on the page, and where possible do not build scripts out of user input at all.
Variants to test
These are follow-up ideas, the kind of thing you try after finding one bug, to see whether the same weakness appears elsewhere.
- Other embed parameters: try the same break-out in
miniTitle,miniColor,miniBgand the numeric parameters (width,height). A positive result is the sameconfirm(location)firing, or any reflected value appearing unencoded in the page source. "Unencoded" means the raw characters appear in the page rather than safe substitutes. - Both hosts: the report lists the same payload URL for
www.hackerone.comandresources.hackerone.com. A subdomain is a site under the same main domain, such asshop.example.comunderexample.com. - Link context without script: set
miniLinkToTitle=trueand put ajavascript:URL or an attribute break-out inminiUrl. A positive result is a clickable link that executes script or an injected attribute that fires. Ajavascript:URL is a link whose target is code rather than a page. - Intermittency: repeat the request with and without cookies, and from different source addresses, to see whether the reflection depends on either. A positive result is a reliable reproduction under one condition and not the other.
Hunting notes
This kind of bug tends to hide in parameterised embed and widget endpoints, where many query values are stitched into HTML and inline JavaScript to configure appearance and behaviour. During recon, look for paths containing embed, widget, mini or read, and for parameters whose names suggest they end up in a link or a script (url, link, title, color, width, height). A quick signal is that a parameter value appears verbatim in the response source, especially inside a <script> block or an href.
"Recon" is short for reconnaissance: the early stage of looking around a site to see what it offers. "Verbatim" means exactly as you typed it, character for character. If you type a distinctive word into a setting and then view the page source (the raw HTML the browser received) and see that word sitting inside a script or a link, that is a strong hint the site is copying your input without cleaning it.
Glossary
- API: a defined way for one piece of software to talk to another, usually over the web.
- Attribute: a setting written inside an HTML tag, such as
onloadin<svg onload=...>. - Brute force: trying many variations by hand or automatically until something works.
- Content Security Policy (CSP): a rule set a website sends to the browser saying which scripts may run.
- Context-aware escaping: converting characters into safe forms depending on where the value will appear on the page.
- Cookie: a small piece of data a site asks your browser to store and send back on each request.
- Cross-site scripting (XSS): getting a website to run an attacker's script as if it were the site's own.
- Endpoint: a specific address on a server that performs a particular action.
- HTML: the language that describes the structure of a web page using tags.
- Inline script: JavaScript written directly inside a page rather than loaded from a separate file.
- Intermittent: happening only some of the time, not reliably.
- IP blocking: a server refusing requests from certain network addresses.
- JavaScript: the programming language that runs inside a web browser.
- Marketing site: a public website that describes a company and its products rather than holding sensitive data.
- Mini player: a small embedded box that shows a resource with a title, link and display options.
- Origin: the combination of scheme, hostname and port that a browser treats as one site.
- Parameter (query parameter): a named setting in a web address, after the
?, written asname=value. - Payload: the crafted input an attacker sends to trigger a bug.
- Query string: everything after the
?in a web address, made of parameters separated by&. - Recon: reconnaissance, the early stage of exploring a site to see what it offers.
- Reflected XSS: XSS where the malicious input travels in the request and is echoed straight back in the response.
- Remediation: the fix applied to remove a vulnerability.
- Subdomain: a site under a main domain, such as
shop.example.comunderexample.com. - SVG: an image format written in HTML-like markup, which can carry event handlers such as
onload. - URL encoding: writing characters as
%plus two hex digits so they can travel safely in a web address. - Verbatim: exactly as written, character for character.
- Widget: a small self-contained piece of a page, such as an embed box.