Cross-site Scripting (XSS) on HackerOne careers page
The careers page read a query-string parameter and inserted it into a job listing link without sanitising it, so a crafted URL could inject HTML and script into the page. The reporter could not get script to run in Chrome or Firefox because of CSP and URL encoding, but it worked in IE and Edge.
- Triaged in under an hour
- Fixed in 14 days
- Paid in 14 days
- Disclosed after 44 days
Dear HackerOne team,
Summary:
I found DOM XSS at endpoint https://www.hackerone.com/careers, but can not bypass CSP. It's work on IE and Edge.
Steps To Reproduce
- JS file is "Masonry js file", vulnerability code:
//Checking for potential Lever source or origin parameters
var pageUrl = window.location.href;
var leverParameter = '';
var trackingPrefix = '?lever-'
if( pageUrl.indexOf(trackingPrefix) >= 0){
// Found Lever parameter
var pageUrlSplit = pageUrl.split(trackingPrefix);
leverParameter = '?lever-'+pageUrlSplit[1];
}
var link = posting.hostedUrl+leverParameter;
jQuery('#jobs-container .jobs-list').append(
'<div class="job '+teamCleanString+' '+locationCleanString.replace(',', '')+' '+commitmentCleanString+'">' +
'<a class="job-title" href="'+link+'"">'+title+'</a>' +
'<p class="tags"><span>'+team+'</span><span>'+location+'</span><span>'+commitment+'</span></p>' +
'<p class="description">'+shortDescription+'</p>' +
'<a class="btn" href="'+link+'">Learn more</a>' +
'</div>'
);
linkvariable is append by jquery.- POC:
https://www.hackerone.com/careers?lever-#aaa"><script src="https://app-sj17.marketo.com/index.php/form/getForm?callback=alert"></script>
Optional: Your Environment (Browser version, Device, etc)
- IE, Edge (because url is encoded on firefox and chrome)
Optional: Supporting Material/References (Screenshots)


Impact
- XSS but can not bypass CSP
- inject html code
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 page copied a URL parameter into a link attribute and then built HTML from it with jQuery without escaping, so the value could break out of the attribute and add new elements.
Impact
An attacker could inject HTML into the careers page and, in IE and Edge only, run script; CSP blocked the script in other browsers.
What the attacker needed
Victim opens a crafted link; victim uses IE or Edge; CSP does not block the script
How it was found
- Open the careers page with a crafted query string containing the lever marker and injected markup.
- The page script reads the full URL and extracts everything after the lever marker.
- That extracted value is concatenated into the job link and appended to the page as HTML.
- The injected markup is rendered, and in IE or Edge the script runs.
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.
The page took part of the web address (the bit after a marker) and pasted it straight into the page's HTML. Because it was not cleaned first, an attacker could put their own HTML tags in the link and make the browser treat them as real page content. A Content Security Policy (a browser rule that blocks scripts from unknown sources) stopped the script from running in most browsers, but not in older ones.
What is XSS?
Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.