900$ XSS in yahoo : recon wins
A private WebPageTest instance on a Yahoo subdomain had a PHP endpoint vulnerable to reflected cross-site scripting. An attacker could execute script in a victim's browser in the context of that Yahoo subdomain.
Published on medium.com
{{media:0}}
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Context
This is a write-up about reconnaissance rather than about a clever XSS bypass. The author says plainly that the XSS he found was an easy hit; the interesting part is how he got to the endpoint and how a tool helped him confirm the injection. The target was a Yahoo asset, and the author focuses on Yahoo because, in his words, it is a sea of assets with a great team, and because he knows how their sub-domains are organised.
The host he landed on, bf1-adxdb-001.data.bf1.yahoo.com, turned out to run a private instance of WebPageTest (https://www.webpagetest.org/). WebPageTest is a performance testing service that loads a URL you give it and reports on how the page behaves. A private instance of it on an internal-looking host is exactly the kind of forgotten application that recon is meant to surface.
Setup
The author does not describe any account, role or credential. The tools he names are:
- dirsearch, run against the target with more than one wordlist.
- Knoxss, an XSS discovery service created by Brute, which he ran as a browser plugin scoped to
*.yahoo.com. He links to https://knoxss.me/?page_id=2 for documentation and recommends it because of the success he had with it. - shodan.io, which he says he monitors daily for Yahoo assets.
- aquatone and sublister for sub-domain discovery.
No versions are given for any of these. The precondition for the whole chain is simply that the host was reachable and that the author was willing to keep enumerating after an uninteresting first response.
Finding it
The starting point was the host root:
http://bf1-adxdb-001.data.bf1.yahoo.com
The response was "The requested URL was not found on this server", which the author notes is something most Yahoo bug bounty hunters see routinely.

Rather than moving on, he ran a quick dirsearch against the target and found an about.php file:
http://bf1-adxdb-001.data.bf1.yahoo.com/about.php
This time the response was surprising: a private WebPageTest instance was running on the server.

Digging into the application did not produce a bug. During that digging he did find a default nginx installation endpoint that exposed most of the PHP endpoints on the server:
http://bf1-adxdb-001.data.bf1.yahoo.com/nginx.conf
He then ran dirsearch again with a different wordlist, this time looking specifically for PHP endpoints, and found the vulnerable one:
http://bf1-adxdb-001.data.bf1.yahoo.com/testdb.php
The response was:
Fatal error: Call to undefined function mysqli_connect() in /home/y/share/htdocs/testdb.php on line 8 [/testdb.php/]
The error tells you the script tried to open a database connection and that the MySQLi extension was not available, so the call failed. It also leaks the absolute path of the script and the line number. At that point, as the author puts it, you realise you have to get something out of it.
Exploitation
Step 1: enumerate and keep the endpoint list
By this stage he had a lot of endpoints and was testing them all. The nginx.conf exposure revealed most of the PHP endpoints on the server, and a second dirsearch run with a PHP-focused wordlist produced testdb.php.
Step 2: let Knoxss watch the traffic
With the Knoxss plugin running for *.yahoo.com, he tested the endpoints. Knoxss triggered an XSS in the subject domain while he was working through them. The final payload is shown in the screenshot below.

The report does not reproduce the payload as text, so the exact parameter and value are only visible in that image.
Step 3: report
The finding was reported to Yahoo; the title puts the bounty at 900 USD. The author is explicit that the XSS itself was easy; the value came from the recon that put him in front of the right endpoint.
Root cause
The report does not analyse the vulnerable code, so the mechanism behind the XSS is not stated. What the report does show is a chain of exposure that made the endpoint findable:
- A host that returns a generic not-found at the root but serves a full application under a discovered path.
- A default nginx installation endpoint (
nginx.conf) that lists most of the PHP endpoints on the server. - A debug-style PHP script (
testdb.php) that returns a fatal error with the absolute path and line number, confirming it is live and reachable.
Why the application's existing defences did not stop the injection is not described in the report.
Impact
The report does not describe what the XSS allowed an attacker to do in this specific application, nor which users would have been affected. The bounty was 900 USD. Any statement about session theft, action-on-behalf-of-users or internal network access would be speculation beyond what the author wrote.
Fix
The report does not say what Yahoo changed. Read as a set of recommendations, the exposures it documents point at:
- Removing or restricting the default nginx installation endpoint so it does not enumerate PHP endpoints.
- Removing debug scripts such as
testdb.phpfrom production hosts, or at least suppressing fatal error output that leaks paths and line numbers. - Not leaving private instances of third-party tools such as WebPageTest reachable on internet-facing hosts.
Which of these were actually applied is not stated.
Variants to test
- Root returns not-found. Run dirsearch (or any content discovery tool) with several wordlists against the host anyway. A positive result is any path that returns something other than the generic not-found page, such as
about.phphere. - Default server config files. Request
nginx.confand equivalent default installation files. A positive result is a response that lists or reveals application endpoints. - PHP endpoints from the config. Feed the discovered PHP paths into a second dirsearch run with a PHP-focused wordlist. A positive result is a script that returns a stack trace, fatal error or other debug output.
- Debug output as a signal. Look for errors that include absolute paths and line numbers, as
testdb.phpdid. A positive result confirms the script is live and gives you the server's directory layout. - Third-party tools on forgotten hosts. Check whether a discovered host runs a private instance of a known tool (WebPageTest in this case). A positive result is the tool's own interface responding on the host.
- Automated XSS discovery across the endpoint list. Run a scanner such as Knoxss scoped to the domain while you manually exercise the endpoints. A positive result is a reflected or triggered payload in a parameter you had not singled out.
- Deep sub-domain enumeration. The author monitors Yahoo assets on shodan.io daily, uses aquatone and sublister to find interesting sub-domains, then looks for further sub-domains beneath each one, level by level. He gives the shape of the targets he reaches as:
target.*.*.*.yahoo.com & target.*.*.*.*.yahoo.com
He also runs full port scans on thousands of IPs, which he says led to most of his Yahoo reports: open ports, access control servers, appliances, storage consoles and web applications other researchers had not touched. A positive result there is any service on a non-standard port that responds with an application interface.

His two stated lessons are to keep going when a target answers forbidden or not found, and to treat recon as the part that wins: it needs focus and patience, and going down level after level is what surfaces the assets nobody else is looking at.
What happened, in plain words
A security researcher found a cross-site scripting (XSS) bug on a Yahoo server and was paid 900 USD for it. The bug itself was easy to trigger. The interesting part, and the part he wants to teach, is how he found the server and the page where the bug lived. He did not guess. He searched, step by step, through Yahoo's many sub-domains and through the files on one of them, until he reached a page that nobody seemed to be watching.
To understand the story you need a few ideas first.
A sub-domain is a name that sits in front of a main domain. If the main domain is yahoo.com, then data.bf1.yahoo.com is a sub-domain of it, and bf1-adxdb-001.data.bf1.yahoo.com is a sub-domain of that. Companies like Yahoo own thousands of these, and each one can point to a different machine running a different piece of software. Some are old, some are forgotten, and forgotten machines are where bugs tend to survive.
Recon (short for reconnaissance) means the searching phase: finding out which machines and pages exist before you start testing them. Think of it like walking around a large building trying every door before you decide which room to break into. The author's whole point is that recon is where the value was.
XSS (cross-site scripting) is a bug where a website takes something a visitor typed or sent, and puts it back into the page as if it were part of the site's own instructions. If the site puts back text, nothing bad happens. If it puts back code that the browser then runs, an attacker can make the browser do things on behalf of the logged-in user, such as reading their data or acting as them. The browser trusts the site, so it trusts whatever the site hands it, even when that content originally came from an attacker.
A payload is simply the specific piece of input an attacker sends to trigger a bug. For XSS it is usually a short snippet of code that the page is tricked into running.
dirsearch is a program that tries a long list of common file and folder names against a website, one after another, and reports which ones exist. The list of names is called a wordlist. It is like trying every key on a big ring in a lock, quickly, to see which one turns.
Knoxss is a service that watches the traffic between your browser and a website and looks for signs that input you send is being reflected back in a way that could run as code. The author ran it as a browser plugin limited to *.yahoo.com, meaning it only watched Yahoo addresses. The * is a wildcard: it stands for any sub-domain of yahoo.com.
shodan.io is a search engine for internet-connected machines. Instead of indexing web pages, it indexes devices and services that are reachable from the internet, so you can search for, say, all machines running a particular piece of software.
aquatone and sublister are tools that help discover sub-domains. You give them a domain and they try to find names that exist underneath it.
WebPageTest (https://www.webpagetest.org/) is a public service that loads a web address for you and reports how fast and how well the page performed. Companies sometimes install their own private copy of it on their own servers. A private copy on an internal-looking machine is exactly the kind of thing recon is meant to uncover, because it is a whole application that nobody remembers is there.
nginx is a very common web server program. It is the software that receives a browser's request and sends back the page. It comes with default configuration files, and if one of those files is left reachable from the internet, it can reveal how the server is set up.
PHP is a programming language used to build web pages on the server side. A file ending in .php is a script that runs on the server and produces a page. A PHP endpoint is simply one of those scripts that a browser can request by its address.
A fatal error is a message a program prints when it hits a problem it cannot recover from and stops. Web servers sometimes show these messages to visitors, and they can leak details about the server that were never meant to be public.
With those ideas in place, here is the story in order.
The starting point
The author says he does not have much time to hunt for bugs because of his work, so when he does, he focuses on Yahoo. He gives two reasons: Yahoo is a huge collection of assets with a good security team, and he knows how their sub-domains are organised. That knowledge is itself a form of recon: knowing the naming pattern helps you guess where to look.
During one of these searches he came across this address:
http://bf1-adxdb-001.data.bf1.yahoo.com
This is the root of a host. The http:// part says to use the ordinary web protocol, and the rest is the machine's name. When he requested it, the server answered with a message saying the requested URL was not found on that server. He notes that most Yahoo bug bounty hunters see this routinely. In other words, the front door looked shut.

The screenshot shows that not-found response. Most people would stop here, tick the box as "nothing here", and move on. The author does not, and that decision is the first lesson of the article.
Finding a page that exists
Instead of leaving, he ran a quick dirsearch against the host. dirsearch takes a wordlist of common names, such as about, admin, test, login, and asks the server for each one in turn. When a name exists, the server answers differently from the generic not-found page, and dirsearch reports it.
That run found a file called about.php:
http://bf1-adxdb-001.data.bf1.yahoo.com/about.php
The response was surprising. A private instance of WebPageTest was running on that server.

The screenshot shows the WebPageTest interface answering on that Yahoo host. This is the payoff of the first step: the root said "not found", but a page one level down revealed a whole application. The lesson is that a not-found at the front door says nothing about the rooms behind it.
Digging, and a configuration file that lists everything
He started digging into the WebPageTest application to look for bugs, and could not find any. During that digging, however, he found a default nginx installation endpoint that exposed most of the PHP endpoints on the server:
http://bf1-adxdb-001.data.bf1.yahoo.com/nginx.conf
nginx.conf is the main configuration file for the nginx web server. It describes which addresses the server answers, where the files live, and how requests are routed. It is meant for the server's administrators, not for visitors. When it is reachable from the internet, anyone can read it and learn the layout of the site, including the names of scripts that are not linked from any page.
Think of it as finding the building's floor plan taped to the outside of the front door. You still have to walk to each room, but now you know which rooms exist and what they are called.
The file revealed most of the PHP endpoints on the server, and he then ran dirsearch again with a different wordlist aimed at PHP endpoints.
Finding the vulnerable script
With that map in hand, he ran dirsearch on the server again, this time with a different wordlist aimed specifically at PHP endpoints. That run found the vulnerable one:
http://bf1-adxdb-001.data.bf1.yahoo.com/testdb.php
The response was:
Fatal error: Call to undefined function mysqli_connect() in /home/y/share/htdocs/testdb.php on line 8 [/testdb.php/]
Line by line, in plain words:
Fatal error:means the script hit a problem it could not recover from and stopped running.Call to undefined function mysqli_connect()means the script tried to use a built-in function for talking to a database, calledmysqli_connect, but that function was not available on this server, so the call failed. In everyday terms, the script reached for a tool that was not in the toolbox.in /home/y/share/htdocs/testdb.php on line 8tells you the exact file on the server's disk and the exact line inside it where the failure happened. That is information about the server's internal layout that a visitor was never meant to see.[/testdb.php/]repeats the address of the script.
Two things follow from this message. First, the script is alive and reachable: it ran far enough to fail. Second, the server is configured to show detailed errors to visitors, which leaks the absolute path of the file and the line number. The author's reaction, as he puts it, is that at this point you realise you have to get something out of it. He had invested several steps and now had a live script that was clearly not polished for public use.
Testing all the endpoints with Knoxss watching
By now he had a lot of endpoints, and he was testing them all. This is the patient part: requesting each script, sending it input, and watching what comes back.
He had the Knoxss plugin running for *.yahoo.com while he did this. Knoxss watches the traffic and looks for signs that input is being reflected back in a way that could run as code. It is like having an assistant look over your shoulder who has seen thousands of these tests and can spot the pattern faster than you.
While he was working through the endpoints, Knoxss triggered an XSS in the subject domain. The final payload is shown in the screenshot below.

The screenshot is where the payload appears. The report does not reproduce the payload as text, so the exact parameter and value are only visible in that image. What the report does say is that the XSS itself was an easy hit: once the right endpoint was in front of him, the injection was straightforward. The difficulty, and the value, was in getting there.
Reporting it
He reported the finding to Yahoo; the title puts the bounty at 900 USD. He is explicit that the XSS was easy and that the recon is what made the report possible. The tool helped him confirm the injection, but the tool only had something to confirm because he had spent the time finding the endpoint.
What made it findable
The report does not analyse the vulnerable code, so the exact mechanism behind the XSS is not stated. What the report does show is a chain of exposures, each one making the next step easier:
- A host that answers not-found at the root but serves a full application under a discovered path.
- A default nginx installation endpoint (
nginx.conf) that lists most of the PHP endpoints on the server. - A debug-style PHP script (
testdb.php) that returns a fatal error with the absolute path and line number, confirming it is live and reachable.
Why the application's existing defences did not stop the injection is not described in the report.
What the impact was
The report does not describe what the XSS allowed an attacker to do in this specific application, nor which users would have been affected. The bounty was 900 USD. Anything about stolen sessions, actions taken on behalf of users, or access to Yahoo's internal network would be guesswork beyond what the author wrote.
What could be fixed
The report does not say what Yahoo changed. Read as a set of recommendations, the exposures it documents point at three things:
- Remove or restrict the default nginx installation endpoint so it does not enumerate PHP endpoints.
- Remove debug scripts such as
testdb.phpfrom production hosts, or at least stop showing fatal error output that leaks paths and line numbers. - Do not leave private instances of third-party tools such as WebPageTest reachable on internet-facing hosts.
Which of these were actually applied is not stated.
Things to try yourself
These are the same checks, written as steps a beginner can follow. For each one, the report describes what a positive result looks like.
- The root says not found. Run dirsearch, or any content discovery tool, against the host anyway, with several wordlists. A positive result is any path that returns something other than the generic not-found page, such as
about.phphere. - Default server configuration files. Request
nginx.confand similar default installation files. A positive result is a response that lists or reveals application endpoints. - PHP endpoints from the configuration. Feed the PHP paths you discovered into a second dirsearch run with a PHP-focused wordlist. A positive result is a script that returns a stack trace, fatal error or other debug output.
- Debug output as a signal. Look for errors that include absolute paths and line numbers, as
testdb.phpdid. A positive result confirms the script is live and gives you the server's directory layout. - Third-party tools on forgotten hosts. Check whether a discovered host runs a private instance of a known tool, WebPageTest in this case. A positive result is the tool's own interface responding on the host.
- Automated XSS discovery across the endpoint list. Run a scanner such as Knoxss scoped to the domain while you manually exercise the endpoints. A positive result is a reflected or triggered payload in a parameter you had not singled out.
- Deep sub-domain enumeration. The author monitors Yahoo assets on shodan.io daily, uses aquatone and sublister to find interesting sub-domains, then looks for further sub-domains beneath each one, level by level. He gives the shape of the targets he reaches as:
target.*.*.*.yahoo.com & target.*.*.*.*.yahoo.com
In that line, target stands for a name he found, and each * stands for another level of sub-domain in front of it. So the first address has three extra levels and the second has four. He also runs full port scans on thousands of IPs. A port scan asks a machine, for each of its numbered network doors, whether anything is listening. He says this led to most of his Yahoo reports: open ports, access control servers, appliances, storage consoles and web applications other researchers had not touched. A positive result there is any service on a non-standard port that responds with an application interface.

The screenshot shows what his sub-domain searching looks like in practice: name after name, level after level.
His two stated lessons are simple. First, do not stop when a target answers forbidden or not found; run dirsearch or whatever tool you prefer to find endpoints. Second, recon wins: recon at Yahoo is not an easy process, it needs focus and patience, and going down level after level is what surfaces the assets nobody else is looking at. He acknowledges that other researchers are smart enough to find bugs in publicly available web apps without this kind of work, and that they are very successful at it. He simply chose the hard way, and says he loves it.
Glossary
- Sub-domain: a name placed in front of a main domain, such as
data.bf1.yahoo.comunderyahoo.com, usually pointing to a separate machine or service. - Recon (reconnaissance): the searching phase of security testing, where you find out which machines, sub-domains and pages exist before testing them.
- XSS (cross-site scripting): a bug where a site puts attacker-supplied content back into a page in a way that the browser runs as code, letting the attacker act as the site towards the user.
- Payload: the specific input an attacker sends to trigger a bug, usually a short piece of code for XSS.
- dirsearch: a tool that requests a long list of common file and folder names from a website and reports which ones exist.
- Wordlist: a list of names or words that a tool such as dirsearch tries one by one.
- Knoxss: an XSS discovery service, used here as a browser plugin scoped to
*.yahoo.com, that watches traffic for signs of injectable input. - Wildcard (
*): a symbol standing for any value; in*.yahoo.comit means any sub-domain of yahoo.com. - shodan.io: a search engine that indexes internet-connected machines and the services they expose, rather than web pages.
- aquatone: a tool the author uses to find interesting sub-domains.
- sublister: a tool for enumerating sub-domains of a given domain.
- WebPageTest: a service that loads a web address and reports on the page's performance; companies sometimes run private copies on their own servers.
- nginx: a widely used web server program that receives browser requests and returns pages.
- nginx.conf: the main configuration file of an nginx web server, describing routing and file locations; it should not be publicly readable.
- PHP: a programming language for building web pages on the server side; files ending in
.phpare scripts that run on the server. - Endpoint: a specific address on a server that a browser can request, such as a particular script.
- Fatal error: a message a program prints when it hits an unrecoverable problem and stops.
- Absolute path: the full location of a file on a server's disk, starting from the top of the filesystem, such as
/home/y/share/htdocs/testdb.php. - Port scan: a check, for each numbered network door on a machine, of whether anything is listening there.
- Bug bounty: a programme in which a company pays researchers for reporting security bugs to it.
- Bounty: the amount paid for a reported bug; here, 900 USD.