Summary by Atlassian
Server-side Request Forgery Vulnerability in Jira 8.20.6
Server-side Request Forgery Vulnerability in Jira 8.20.6
Interesting old one
Jira Software Data Center
Web App
Hi Atlassian team,
While doing testing on a different bug bounty program, they were hosting a Jira data version "8.20.6". During the task, I found a Full SSRF through the endpoint "/plugins/servlet/gadgets/makeRequest". This SSRF permits requests using any HTTP methods, with any custom headers, to any internal endpoint with the next specified conditions.
The allowlist used in Jira is:
https://*.sim4n6.clubAccording to the official documentation, this suggests:
Allows all matching URLs. Use the wildcard * character to replace one or more characters.
This means that an allowlist for https://*.sim4n6.club would permit only sim4n6.club subdomains through the secure HTTPS. However, it is not the case, since HTTP requests were made to any external/internal domain in an URL crafted as follows https://anydomain.com?www.sim4n6.club or even https://anydomain.com?r=www.sim4n6.club.
It seems that such crafted URLs bypass the allowlist parsing in a way that respects the wildcard expression, but the domain it points to is different from the one a user intended. The string "sim4n6.club" could be used in a path or a query. Thus, the attacker could induce the server-side into performing requests (SSRF) and getting the response with the headers.
To illustrate the bug, I made a couple of screenshots. As you can see in the first screenshot. The request to the OAST catcher was 403 forbidden.
The request to the URL similar to https://xxxxxxxxxx.oastify.com?r=www.sim4n6.club was 200 OK while retrieving the response body and headers.
Please, consider my bug report because it may be a bypass for CVE-2019-8451. A confluence product is concerned too.