Last year, I got an invitation from a private bug bounty program on HackerOne platform. I said let’s give it a try since I had some free time and here is the story of how I take advantage of an out-of-scope domain to earn $1250 bounty.


Note: in this text out-of-scope refers to out of scope domains, not bugs.

First, as we all know out-of-scope is a bug bounty rule that you need to respect for multiple reasons including, but not limited to:

  • The team know that there are vulnerabilities in these domains and working on solving them before they include it in the scope.
  • The BBP has a small budget to cover these domains.
  • These domains are for users only, and any interaction with users that can cause a damage is unwanted.

Although, you can use these domains to cause a harmful attack on the in-scope domains. We saw a lot of examples in bug bounty programs where the escalation had been done using an out-of-scope domain. Additionally, an RCE on an out-of-scope domain may be counted as a valid report like bbp.

So, I was doing the recon when I found a subdomain that was using AnswerHub, meanwhile, I had a bug to create a stored XSS in that system. However, I won’t get into details because I have explained it in my previous write-ups, you can check them out: How I Hacked [Oculus] OAuth +Ebay +IBM, Leaking CSRF Tokens Using Service Worker API. Also, these two write-ups are good examples of escalation and out-of-scope domains use.

Technical Details

first of all, I read the bug bounty rules of the program, it is very important to read the whole page don’t forget any details that may be used against you or you will be disqualified.

After I found the subdomain list using sublist3r I found this subdomain which was using AnswerHub and was affected by the previously mentioned vulnerability. Unfortunately, I didn’t find it inside the in-scope domains. So I didn’t submit a report for the team and said let’s look further and I will ask them if they are interested in this issue when I submit a report in the future.

I start looking for bugs in in-scope domains. I was checking an Angular app that was hosted on I checked some angular and JS tricks. I found something while typing in the console I was on and I typed:


In the meantime I knew I found a bug here, so I checked the source code of the page and found this line in the head script on

document.domain = "";

Let me explain why this is a dangerous issue that can be used to bypass SOP. You can make two pages from a different origin to interact with each other if they are sharing the same second-level domain, in our case the set the document.domain property to so if we set the document.domain property of to, we can create a frame for and execute code on the developer’s site. Here is a live version of the trick:

As you can see I read the secret paragraph from a cross-domain.

One more thing we need to frame the page of, but the x-frame-option header was set to Deny :(.
I went to sleep and in the next day, I found that the /support/ path has no x-frame-option header which we can frame :D.

For simple PoC I wrote the following script saved it as poc.xml and uploaded to

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
<html xmlns="">
        <script type="text/javascript">
             document.domain = '';
             function exploit(){
             var  i = document.getElementById("my_frame");
             var exp = i.contentWindow.document.getElementsByClassName('ng-binding')[3].innerText;
  <iframe src="" id="my_frame" onload="exploit();"></iframe>

I checked the PoC and everything worked well. I was able to read data and execute JS on which is in the scope :D


Steps To Reproduce:

  • Go to, open any question and click reply.
  • Upload this file poc.txt as an attachment and intercept the request.
  • Change Content-Type from text/plain to text/xml and forward the request.
  • Go to the attachment URL, you will access the contentWindow of and you will see an alert box that contains your username.

I reported the bug to the program and they were very fast and I got $1250 for an XSS!



They fixed the x-frame-option header with CSP, and the AnswerHub issue too now my XML file is being served as a text file.


In brief, you may be able to escalate your attacks by using API’s, JS workarounds, a misconfiguration on a domain that isn’t under the program scope.

I hope you enjoyed reading the write-up and learned something.

If you like it feel free to retweet it :) and follow me on twitter@Abdulahhusam.