Skip to content
XSS Write-up Beginner

Spend more time doing recon, you’ll find more BUGS.

The author found several Jira instances on IP addresses belonging to the target company, some running version 7.3.3, which were vulnerable to a known reflected XSS (CVE-2018-20824) and other CVEs leading to information disclosure. An attacker could exploit these to run scripts in a victim's browser or access sensitive information.

Vedant Tekale Follow

Published on medium.com

Hello again great #bugbounty community! My name is Vedant(Also known as Vegeta on Twitter😁) and I’m a cybersecurity enthusiast and an aspiring Bug hunter :) I’m learning and doing bug hunting for about 6 months now and I really love what I do.

Vedant Tekale, on medium.com

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.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 5 min read.

Context

This is a story about recon on a private program whose scope covered all of the company's owned assets. The researcher, Vedant Tekale (known as Vegeta on Twitter), had been doing bug hunting for about six months at the time and had spent the period since August learning different recon methodologies. The write-up is framed around a recon technique he tried for the first time: enumerating a target's IP address ranges through ASN and CIDR data rather than starting from subdomain enumeration.

The scan returned IP addresses in the company's range, and some of them were running an Atlassian Jira dashboard, version 7.3.3. The bugs that followed were known CVEs in that Jira version: a reflected XSS and two information disclosure issues.

Setup

The work was done against a private program, so the target name and the IP addresses are not disclosed. The only precondition was that the program's scope included all assets owned by the company, which is what made scanning the whole CIDR legitimate.

Tools used:

  • https://whois.arin.net/ui/ to look up the target's CIDR.
  • masscan to scan the range.
  • aquatone to screenshot every host that came back.
  • Nuclei with its CVE templates to check the hosts against known vulnerabilities.

Before this, the researcher's usual approach had been to collect all subdomains of a program and then fingerprint, fuzz and so on. On this program he had already found information disclosure, SSRF and XSS on some subdomains, but some of those reports were marked as duplicates. That is what pushed him to try a different angle.

Finding it

The idea came from a video by Jason Haddix on bug hunting methodology, where he learned about ASNs and CIDR. A CIDR block is simply the range of IP addresses the target company owns, so querying it gives you the range of IP addresses the target company owns..

He searched the target name in ARIN's WHOIS interface and got results, including the CIDR of the target.

From the original on medium.com

Exploitation

Step 1: scan the CIDR for web ports

He scanned the range with masscan using the following command:

Text
Command:- bin/massscan — range CIDR_here -p 80, 443, 8080, 8443 -oG results.txt — rate 10000

The command targets the four common web ports (80, 443, 8080 and 8443), writes greppable output to results.txt and sets a packet rate of 10000. The scan produced about 140 IPs in the output file.

Step 2: screenshot every host

To triage 140 hosts quickly he piped the results into aquatone:

Text
Command:- cat results.txt | aquatone -out ~aquatone/target

This takes each host from results.txt and saves a screenshot into the ~aquatone/target output directory.

Step 3: spot the Jira dashboards

Going through the screenshots one by one, he noticed that some of the IPs had a Jira dashboard running. He checked the version: 7.3.3. A search for Jira 7.3.3 vulnerabilities led him to the CVE list for that version.

Step 4: exploit CVE-2018-20824

Reading through the CVEs one by one, he picked out CVE-2018-20824, a reflected XSS. He searched for a public exploit, copied the exploit path, and appended it to one of the IPs running the Jira dashboard. The XSS triggered successfully. He then tried the same path against every other IP running a Jira dashboard, and all of them were vulnerable.

Step 5: automate the remaining CVEs with Nuclei

Rather than checking each remaining CVE by hand, he ran Nuclei with its CVE templates against the same host list:

Text
Command:- nuclei -t /path/to/nuclei-templates/cves/ -l results.txt -o nuclei_cve.txt -c 200

This runs every template under the cves/ directory against the hosts listed in results.txt, writes findings to nuclei_cve.txt and uses a concurrency of 200. The run returned IPs vulnerable to CVE-2019-8449 and CVE-2020-14179, both of which lead to information disclosure.

Root cause

The underlying issue is unpatched software: Jira 7.3.3 was running on hosts in the company's range and carried publicly documented vulnerabilities, including a reflected XSS and information disclosure flaws. The report does not describe the vulnerable code paths themselves.

Impact

On every Jira host he tested, the reflected XSS from CVE-2018-20824 triggered, and Nuclei confirmed information disclosure through CVE-2019-8449 and CVE-2020-14179 on some of the IPs. The report does not state what data the disclosure exposed or who could reach the hosts. He submitted several reports; some were marked as duplicates and a few were accepted.

Fix

The obvious fix, given the findings, is to upgrade Jira past 7.3.3 to a version that addresses CVE-2018-20824, CVE-2019-8449 and CVE-2020-14179.

Variants to test

  1. CIDR-first recon on any program that scopes owned assets. Query ARIN (or the relevant regional registry) for the company name, take the CIDR, and scan ports 80, 443, 8080 and 8443 with masscan. A positive result is hosts that never appear in your subdomain list.
  2. Screenshot triage at scale. Pipe masscan output into aquatone and review the screenshots for admin panels, dashboards and login pages. A positive result is an identifiable product and version on a host you did not know about.
  3. Version-to-CVE lookup. When a screenshot shows a product and version, pull the CVE list for that exact version and read the entries for issues that need no authentication. A positive result is a CVE with a public exploit path you can append to the host.
  4. Template sweep across the whole host list. Run Nuclei's cves/ templates against the masscan output with high concurrency. A positive result is hosts flagged for known CVEs such as CVE-2019-8449 and CVE-2020-14179, which you can then verify manually before reporting.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 11 min read.

What happened, in plain words

A security researcher spent a few months learning a technique called reconnaissance, or recon: the work of mapping out what a company has exposed on the internet before you start testing it. Instead of starting from the company's website names, he looked up the blocks of numeric internet addresses (IP addresses) the company owns, scanned those addresses for web servers, took a picture of every server he found, and spotted that some of them were running an old version of a workplace tool called Jira. That old version had publicly known flaws, and he was able to trigger one of them on every Jira server he tried. He wrote up several reports; some were rejected as duplicates of reports other people had already filed, and a few were accepted.

The story is useful for a beginner because it shows that recon is not only about finding more website names. It is also about finding machines that nobody remembered were there.

Background and setup

This work was done on a private bug bounty program. A bug bounty program is an arrangement where a company invites outside people to test its systems and pays or credits them for reporting problems. A private program means only invited researchers can take part, and the details are not public, so the company name and the addresses are not disclosed here.

The researcher, Vedant Tekale (known as Vegeta on Twitter), had been doing bug hunting for about six months at the time and had spent the period since August learning different recon methods. Before this, his usual approach was to collect all of a program's subdomains and then fingerprint and fuzz them. A subdomain is a name like shop.example.com that sits under a company's main domain; fingerprinting means working out what software each one runs, and fuzzing means throwing lots of inputs at it to see how it reacts. On this program he had already found information disclosure, SSRF and XSS on some subdomains, but some of those reports were marked as duplicates. That is what pushed him to try a different angle.

The only precondition was that the program's scope included all assets owned by the company. Scope is the list of things you are allowed to test; if the scope says "everything the company owns", then scanning the company's whole address range is legitimate. If it does not, scanning outside the scope is not allowed.

The tools used were:

  • https://whois.arin.net/ui/ to look up the target's CIDR.
  • masscan to scan the range.
  • aquatone to screenshot every host that came back.
  • Nuclei with its CVE templates to check the hosts against known vulnerabilities.

Finding it

The idea came from a video by Jason Haddix on bug hunting methodology, where the researcher learned about ASNs and CIDR. Two terms need unpacking here.

An ASN, or Autonomous System Number, is an identifier for a network that the internet's routing system treats as one unit. Large organisations get one, and it is how the internet knows which addresses belong together. Think of it as the postcode district for a company's machines.

A CIDR block is a written range of IP addresses, such as [redacted]/24, which means "this starting address plus the next 255 addresses". It is simply the range of IP addresses the target company owns. Querying it gives you the range of IP addresses the target company owns. DNS is the phone book that turns names into addresses; if a machine has no name in that phone book, looking up names will never find it.

He searched the target name in ARIN's WHOIS interface and got results, including the CIDR of the target. WHOIS is a public directory of who owns which internet addresses and domain names, and ARIN is the registry that covers North America. Searching a company name there is like looking a company up in a public land registry to see which plots it owns.

From the original on medium.com

Exploitation

Step 1: scan the CIDR for web ports

He scanned the range with masscan using the following command:

Text
Command:- bin/massscan — range CIDR_here -p 80, 443, 8080, 8443 -oG results.txt — rate 10000

Line by line, in plain words:

  • bin/massscan is the program being run. Note that the command as written in the report spells it massscan with a double s, while the tool is called masscan; the report's text is reproduced exactly.
  • — range CIDR_here is where the address range goes. The placeholder CIDR_here stands for the block he found in the WHOIS lookup. The dashes in the report are long dashes, not the usual double hyphen.
  • -p 80, 443, 8080, 8443 lists the ports to check. A port is a numbered door on a machine; different services listen on different doors. Port 80 is plain web traffic, 443 is encrypted web traffic, and 8080 and 8443 are common alternative web ports used by admin panels and dashboards.
  • -oG results.txt writes the output in a greppable format to a file called results.txt. Greppable means a plain, line-based format that other tools can read easily.
  • — rate 10000 sets the packet rate to 10000 per second, which is what makes masscan fast.

Why this step: he wanted a list of every machine in the company's range that answers on a web port. The scan produced about 140 IPs in the output file.

Step 2: screenshot every host

To triage 140 hosts quickly he piped the results into aquatone:

Text
Command:- cat results.txt | aquatone -out ~aquatone/target

Line by line:

  • cat results.txt prints the contents of the results file.
  • The vertical bar | is a pipe: it feeds that output into the next program instead of showing it on screen. Think of it as passing a list from one worker to the next on an assembly line.
  • aquatone is a tool that visits each host and takes a screenshot of what it serves.
  • -out ~aquatone/target says where to save the screenshots; ~ means the user's home directory.

Why this step: opening 140 addresses by hand is slow and error-prone. Screenshots let you glance at many hosts at once and spot the interesting ones, the same way you might flick through photos instead of reading a list of file names.

Step 3: spot the Jira dashboards

Going through the screenshots one by one, he noticed that some of the IPs had a Jira dashboard running. Jira is Atlassian's tool for tracking tasks, tickets and projects; a dashboard is the page you land on after logging in, showing your projects and issues. He checked the version: 7.3.3. A search for Jira 7.3.3 vulnerabilities led him to the CVE list for that version.

A CVE, or Common Vulnerabilities and Exposures identifier, is a public catalogue number for a specific known security flaw. When a product's version is visible, you can look up which catalogue numbers apply to it. This is why the version number matters: the same product can be safe in one version and vulnerable in another.

Step 4: exploit CVE-2018-20824

Reading through the CVEs one by one, he picked out CVE-2018-20824, a reflected XSS. XSS, or cross-site scripting, is a flaw where a website takes something a visitor supplies and puts it into the page in a way that makes the browser run it as code. "Reflected" means the input is bounced straight back in the response rather than stored on the server. A simple comparison: a form that echoes your name back to you is fine, but if it echoes whatever you type without cleaning it, someone can type something that the browser treats as an instruction rather than as text.

He searched for a public exploit, copied the exploit path, and appended it to one of the IPs running the Jira dashboard. The XSS triggered successfully. He then tried the same path against every other IP running a Jira dashboard, and all of them were vulnerable. The report does not reproduce the exploit path itself.

Why this step: once one host is confirmed vulnerable, testing the same known path against the others is quick, and it turns one finding into a set of findings across the estate.

Step 5: automate the remaining CVEs with Nuclei

Rather than checking each remaining CVE by hand, he ran Nuclei with its CVE templates against the same host list:

Text
Command:- nuclei -t /path/to/nuclei-templates/cves/ -l results.txt -o nuclei_cve.txt -c 200

Line by line:

  • nuclei is the scanner being run.
  • -t /path/to/nuclei-templates/cves/ points at a folder of templates. A template is a saved recipe for checking one specific known flaw, so the cves/ folder holds recipes for many catalogue numbers.
  • -l results.txt gives it the list of hosts to check, the same file produced by the masscan scan.
  • -o nuclei_cve.txt writes the findings to that file.
  • -c 200 sets concurrency to 200, meaning it works on up to 200 checks at the same time.

Why this step: checking dozens of catalogue numbers by hand against 140 hosts is not realistic. Templates let one run cover the whole list. The run returned IPs vulnerable to CVE-2019-8449 and CVE-2020-14179, both of which lead to information disclosure. Information disclosure means the system reveals data it should have kept private, such as internal details, configuration or records.

Root cause

The underlying issue is unpatched software: Jira 7.3.3 was running on hosts in the company's range and carried publicly documented vulnerabilities, including a reflected XSS and information disclosure flaws. The report does not describe the vulnerable code paths themselves.

In everyday terms: the company had a back door to its building that was not on the list of doors the maintenance team checked, so it never got the new lock.

Impact

On every Jira host he tested, the reflected XSS from CVE-2018-20824 triggered, and Nuclei confirmed information disclosure through CVE-2019-8449 and CVE-2020-14179 on some of the IPs. The report does not state what data the disclosure exposed or who could reach the hosts. He submitted several reports; some were marked as duplicates and a few were accepted.

Fix

The obvious fix, given the findings, is to upgrade Jira past 7.3.3 to a version that addresses CVE-2018-20824, CVE-2019-8449 and CVE-2020-14179.

Variants to test

  1. CIDR-first recon on any program that scopes owned assets. Query ARIN (or the relevant regional registry) for the company name, take the CIDR, and scan ports 80, 443, 8080 and 8443 with masscan. A positive result is hosts that never appear in your subdomain list.
  2. Screenshot triage at scale. Pipe masscan output into aquatone and review the screenshots for admin panels, dashboards and login pages. A positive result is an identifiable product and version on a host you did not know about.
  3. Version-to-CVE lookup. When a screenshot shows a product and version, pull the CVE list for that exact version and read the entries for issues that need no authentication. A positive result is a CVE with a public exploit path you can append to the host.
  4. Template sweep across the whole host list. Run Nuclei's cves/ templates against the masscan output with high concurrency. A positive result is hosts flagged for known CVEs such as CVE-2019-8449 and CVE-2020-14179, which you can then verify manually before reporting.

Glossary

  • ASN (Autonomous System Number): an identifier for a network that the internet's routing system treats as one unit, usually assigned to a large organisation.
  • aquatone: a tool that visits hosts and saves a screenshot of each one, so you can review many at a glance.
  • Bug bounty program: an arrangement where a company invites outside researchers to test its systems and rewards them for reporting problems.
  • CIDR block: a written range of IP addresses, such as [redacted]/24, meaning a starting address plus a fixed number of following addresses.
  • Concurrency: the number of checks a tool works on at the same time.
  • CVE (Common Vulnerabilities and Exposures): a public catalogue number for a specific known security flaw.
  • DNS: the system that turns names like example.com into IP addresses, like a phone book.
  • Duplicate: a report for a problem someone else has already reported, so it earns no separate reward.
  • Fingerprinting: working out what software and version a host is running.
  • Fuzzing: sending lots of varied or malformed inputs to a system to see how it reacts.
  • Greppable output: a plain, line-based output format that other tools can read easily.
  • Information disclosure: a flaw where a system reveals data it should have kept private.
  • IP address: the numeric address of a machine on the internet.
  • Jira: Atlassian's tool for tracking tasks, tickets and projects; its dashboard is the page you land on after logging in.
  • masscan: a very fast port scanner.
  • Nuclei: a scanner that runs saved templates, each checking for one specific known flaw.
  • Port: a numbered door on a machine where a service listens; 80 and 443 are the usual web ports, 8080 and 8443 common alternatives.
  • Private program: a bug bounty program open only to invited researchers, with details not made public.
  • Recon (reconnaissance): the work of mapping out what a target has exposed on the internet before testing it.
  • Reflected XSS: cross-site scripting where the supplied input is bounced straight back in the response rather than stored on the server.
  • Scope: the list of systems a researcher is allowed to test.
  • SSRF (Server-Side Request Forgery): a flaw where an attacker can make a server send requests to places it should not reach.
  • Subdomain: a name under a company's main domain, such as shop.example.com.
  • Template: a saved recipe in Nuclei for checking one specific known flaw.
  • Triage: sorting a large set of results quickly to decide which ones deserve a closer look.
  • WHOIS: a public directory of who owns which internet addresses and domain names.
  • XSS (cross-site scripting): a flaw where a site puts visitor-supplied input into a page in a way that makes the browser run it as code.

More by Vedant Tekale

View all

8 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.