Send AJAX request to external domain
A parameter on the HackerOne site was not filtered for slashes, allowing a crafted link to make the site send AJAX requests to an external domain in browsers without CSP; the reporter was attempting to escalate to XSS.
- Triaged in 26 hours
- Fixed in 2 days
- Paid in 12 days
- Disclosed after 13 days
Summary by the program
If the following conditions are met…
- You are an admin of a demo team
- And you click a malicious link provided by an attacker
- And you are social engineered into interacting with the displayed dialog
- And you are using a browser that doesn't support
Content Security Policy(such as Internet Explorer)
… then a same-origin policy violation could occur.
The report
Hello!
I would like to report about ability to send AJAX request from hackerone.com to external domain.
Here is PoC for the last version of Internet Explorer: https://hackerone.com/bugs?subject=%2Fbigbob.lv%2F1337.php%3Fdata%3D
If You visit it, You can see Hello! This is custom text from external domain text which is from JSON here https://bigbob.lv/1337.php
You can check console and see there 3 AJAX requests sent from hackerone.com to bigbob.lv.
It is possible because there is no filtration of / slash in JavaScript when it handles subject GET param. So, it allows to send AJAX requests to external domain because of //.
This PoC will work in old versions of popular browsers which don't support CSP (http://caniuse.com/#feat=contentsecuritypolicy).
I will try to achieve XSS.
Thanks!
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 failed to sanitise the `subject` GET parameter before using it to construct a URL for an AJAX request, allowing protocol-relative URLs (starting with `//`) to point to an external domain.
Impact
In browsers without Content Security Policy, an attacker could cause the site to send AJAX requests to an external domain; the reporter hoped to escalate to XSS. Browsers with CSP are not affected.
What the attacker needed
Victim is an admin of a demo team; victim clicks a malicious link; victim interacts with a dialog; browser lacks CSP support (e.g. IE)
How it was found
- Craft a link to the HackerOne bugs page with a `subject` parameter containing a protocol-relative URL to an external domain.
- Visit the link in Internet Explorer (or another browser without CSP support).
- Observe that the page sends AJAX requests to the external domain and displays the returned text.
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.
Websites normally prevent scripts from one site from reading data on another site, a rule called the same-origin policy. Here, a part of the HackerOne page that builds a web address from a URL parameter did not block slashes, so an attacker could make the page request data from a different site. In older browsers without Content Security Policy, this could happen.
What is CORS?
A permissive cross-origin policy lets another site read responses with the user's credentials.