Bypass of Wildcard Allowlist which leads to Full SSRF
The Jira allowlist for the makeRequest endpoint used a wildcard expression that could be bypassed by placing the allowed domain in a query parameter, allowing requests to any external or internal domain. An attacker could use this to perform full SSRF, retrieving responses and headers from arbitrary endpoints.
- Accepted in 29 days
- Fixed in 3.2 years
- Disclosed after 3.2 years
Summary by Atlassian
Server-side Request Forgery Vulnerability in Jira 8.20.6
Summary by Sim4n6
Interesting old one
Report details
-
Submitted
18 May 2022 11:37:37 UTC
-
Target Location
Jira Software Data Center -
Target category
Web App
-
VRT
Broken Access Control (BAC) > Server-Side Request Forgery (SSRF) > Internal High Impact
-
Priority
P4
-
Bug URL
Empty
-
Description
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:
- Type: wildcard expression.
- Expression used:
https://*.sim4n6.club - Allow incoming, allow anonymous users.
According 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.clubwould 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 followshttps://anydomain.com?www.sim4n6.clubor evenhttps://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.clubwas200 OKwhile 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.
Context
Jira Software Data Center exposes a gadget endpoint, /plugins/servlet/gadgets/makeRequest, that fetches remote URLs on the server's behalf. Because the server makes the request, the endpoint is a natural SSRF surface, and Atlassian guards it with an allowlist: a list of URL patterns the server is permitted to contact. The allowlist entry in this report is a wildcard expression, https://*.sim4n6.club, configured to allow incoming requests and to allow anonymous users.
Atlassian's own documentation describes the wildcard behaviour as follows:
Allows all matching URLs. Use the wildcard * character to replace one or more characters.
Read literally, https://*.sim4n6.club should permit only subdomains of sim4n6.club over HTTPS. The researcher found that the endpoint would instead issue requests to arbitrary external and internal domains, using any HTTP method and any custom headers, as long as the URL was crafted so that the allowlisted string appeared somewhere in it.
Setup
The testing was not performed against an Atlassian-hosted instance directly. While working on a different bug bounty program, the researcher found that program hosting a Jira Data Center instance running version 8.20.6, and tested against it. The only precondition described is the allowlist configuration above: a wildcard expression, incoming requests allowed, anonymous users allowed. An out-of-band (OAST) interaction server was used to observe the server-side requests.
The report was submitted on 18 May 2022 under the target Jira Software Data Center, category Web App, with the VRT classification Broken Access Control (BAC) > Server-Side Request Forgery (SSRF) > Internal High Impact and priority P4.
Finding it
The researcher's starting point was the makeRequest endpoint and the wildcard allowlist. The mismatch is between what the wildcard expression is documented to mean and what the parser actually accepts. If * matches one or more characters and the rest of the pattern is sim4n6.club, then any URL whose host portion ends in sim4n6.club should pass. The researcher found that URLs where the string sim4n6.club appears in the path or the query string also passed, even though the request went to a completely different domain.
Two shapes are given in the report:
https://anydomain.com?www.sim4n6.club
https://anydomain.com?r=www.sim4n6.club
In both, the host is anydomain.com and the allowlisted string sits in the query string. The allowlist check appears to be satisfied by the presence of the pattern in the URL rather than by a match against the parsed host, so the request is sent to the attacker-chosen domain.
Exploitation
Step 1: Confirm the endpoint blocks a non-matching host
The researcher first sent a request to the OAST catcher, which came back as 403 forbidden.
Step 2: Put the allowlisted string in the query string
The next request used a URL similar to https://xxxxxxxxxx.oastify.com?r=www.sim4n6.club. The host is the OAST catcher, and the allowlisted string is in the query parameter r. This request returned 200 OK, and the researcher was able to retrieve the response body and headers.
https://xxxxxxxxxx.oastify.com?r=www.sim4n6.club
The important parts are the host, which is entirely outside sim4n6.club, and the query string, which carries the text the allowlist is looking for. The server-side fetch went to the OAST catcher, and the endpoint returned what the catcher sent back, including headers. That is the full SSRF primitive: the server makes the request and the response is relayed to the caller.
Step 3: Note the freedom the primitive gives
According to the report, the SSRF permits requests using any HTTP method, with any custom headers, to any internal endpoint, subject to the conditions above. The report does not enumerate specific internal targets or show responses from them.
Root cause
The allowlist is configured as a wildcard expression, and the check that enforces it does not restrict the match to the host component of the URL. A URL such as https://anydomain.com?r=www.sim4n6.club contains the allowlisted pattern, so the check passes, but the request is directed at anydomain.com. The wildcard expression is respected in the sense that the string matches, yet the domain the request actually reaches is not the one the administrator intended to authorise.
Because the string sim4n6.club can be placed in a path or a query, an attacker controls the destination while still satisfying the pattern. The existing defence, the allowlist itself, therefore does not stop the request: it is the allowlist's parsing that is bypassed. The report frames this as a possible bypass of CVE-2019-8451, and notes that a Confluence product is also concerned. Whether the underlying code is the same as in that CVE is not established in the report.
Impact
An attacker who can reach the makeRequest endpoint can induce the Jira server to issue requests to arbitrary external or internal destinations, with any HTTP method and any custom headers, and can read the response body and headers. The report classifies this as a full SSRF and as Internal High Impact under the VRT. The conditions are the ones stated: the wildcard allowlist entry, incoming requests allowed, and anonymous users allowed. The report does not demonstrate access to a specific internal service, so the concrete internal reach is not shown.
Fix
The report does not describe a fix or a vendor response. What the analysis implies is that the allowlist check should match against the parsed host of the URL, not against the URL string as a whole, so that a pattern such as https://*.sim4n6.club cannot be satisfied by text in a path or query string. Whether Atlassian changed the check, the documentation, or both is not stated in the report.
Variants to test
- Query-string placement: send a request to an attacker-controlled host with the allowlisted string as a query value, for example
?r=www.example.comwhereexample.comis the allowlisted domain. A positive result is a200response from the attacker host where a request to the same host without the string returns403. - Path placement: put the allowlisted string in the path, such as
https://attacker.tld/www.example.com. A positive result is the same asymmetry between the two requests. - Userinfo and subdomain tricks: try the allowlisted string in the userinfo portion or as a prefix of the host. A positive result is a request that reaches the attacker host while the allowlist check passes.
- Method and header freedom: once a bypass works, repeat with non-GET methods and custom headers to see whether the endpoint forwards them. A positive result is the OAST server receiving the chosen method and headers.
- Other wildcard entries: test any allowlist entry containing
*the same way, since the flaw is in how the wildcard is matched rather than in the specific domain.
Hunting notes
This kind of bug hides wherever an allowlist or denylist is expressed as a wildcard or substring pattern and enforced against a raw URL string. Gadget and proxy endpoints that fetch remote URLs on the server's behalf are the obvious candidates, and Jira's /plugins/servlet/gadgets/makeRequest is one example. During recon, look for features that accept a URL and return content from it, and for configuration pages that describe allowlists in terms of wildcards. The signal is a documented pattern that should constrain the host but that a parser might apply to the whole URL.
The researcher showed impact with two requests to the OAST catcher: one returned 403 forbidden, and one with the allowlisted string in the query string returned 200 OK with the response body and headers. That contrast demonstrates both that the control exists and that it can be bypassed, without needing to reach a specific internal service.
What happened, in plain words
A security researcher was testing a website that ran a piece of software called Jira. Jira is a tool that teams use to track tasks, bugs and projects. One of Jira's features lets the server fetch a web address on your behalf, for example to pull in content from another site. Because the server does the fetching, this feature can be abused: if you can make the server fetch an address of your choosing, you can reach places that you, sitting at your own computer, could never reach directly. This kind of abuse is called Server-Side Request Forgery, or SSRF.
To stop this, Jira keeps a list of web addresses the server is allowed to contact. That list is called an allowlist. In this case the allowlist entry was a wildcard pattern, https://*.sim4n6.club, which is meant to allow only subdomains of sim4n6.club over secure HTTPS.
The researcher found that the check was too loose. If the allowed text appeared anywhere in the address, even in the part after a question mark, the server accepted it and fetched a completely different domain. That let the researcher make the Jira server send requests to any address, with any method and any custom headers, and read back the response. The report calls this a full SSRF.
Background you need first
What Jira is
Jira is project and issue tracking software made by Atlassian. Teams use it to record work items, assign them to people and move them through stages. Jira Software Data Center is the version that organisations run on their own servers rather than in Atlassian's cloud. The report targets that product.
What a server-side request is
When you open a web page, your browser asks a server for it. But servers also talk to other servers. For example, a server might fetch an image from another site, or call another service to get data. When the server makes that request, it is acting on behalf of the user, but the request comes from the server's own network position. That matters because servers often sit inside a private network with access to internal systems that the public internet cannot reach.
What SSRF is
SSRF stands for Server-Side Request Forgery. The idea is that an attacker tricks a server into making a request the attacker chooses. A simple comparison: imagine a hotel concierge who will fetch anything you ask for from anywhere in the building. Normally that is convenient. But if you can ask the concierge to open the staff-only door and bring back what is behind it, you have used the concierge's access to get somewhere you could not go yourself. SSRF is that, with a web server as the concierge.
What an allowlist is
An allowlist is a list of things that are permitted, and everything not on the list is refused. It is the opposite of a denylist, which lists things that are forbidden. Allowlists are generally safer because it is easier to describe what is allowed than to predict every bad thing. Here the allowlist is a pattern describing which web addresses the server may contact.
What a wildcard is
A wildcard is a special character that stands in for other characters. In this report the character is *. Atlassian's documentation, quoted in the report, says:
Allows all matching URLs. Use the wildcard * character to replace one or more characters.
So a pattern like https://*.sim4n6.club is meant to match any address whose host is a subdomain of sim4n6.club, such as https://app.sim4n6.club or https://test.sim4n6.club, over HTTPS.
What a URL is made of
A web address, or URL, has parts. Take https://anydomain.com?r=www.sim4n6.club:
httpsis the scheme, the protocol used.anydomain.comis the host, the actual machine being contacted.?r=www.sim4n6.clubis the query string, extra information passed to that machine.
The host is what decides where the request goes. The query string is just data sent along with it. This distinction is the heart of the bug: the allowlist was meant to check the host, but it ended up being satisfied by text in the query string.
What an OAST catcher is
OAST stands for out-of-band application security testing. An OAST catcher is a service that gives you a unique address and records any request that arrives at it. You use it to prove that a server really did make a request you caused, because you see the request land on your catcher. In this report the catcher was a domain ending in oastify.com.
What HTTP methods and headers are
HTTP is the language browsers and servers use to talk. Each request has a method, which says what kind of action is wanted. GET means fetch something. Other methods exist for other actions. Each request also carries headers, which are labelled pieces of extra information, such as what kind of content the client accepts. The report says the SSRF allowed any method and any custom headers, which widens what an attacker can do.
What a status code is
Every HTTP response starts with a three-digit status code. 200 OK means the request succeeded. 403 forbidden means the server understood the request but refused to carry it out. The researcher used these two codes to show the difference between a blocked request and a bypassed one.
What CVE-2019-8451 is
CVE stands for Common Vulnerabilities and Exposures. A CVE is a public identifier for a known security flaw, so people can refer to the same bug unambiguously. CVE-2019-8451 is an earlier Jira SSRF issue. The report suggests this finding may be a bypass of that earlier fix, and notes that a Confluence product is also concerned. Confluence is another Atlassian product, used for documentation and wikis. The report does not establish whether the underlying code is the same as in that CVE.
The setup
The testing was not done against an Atlassian-hosted instance directly. While working on a different bug bounty program, the researcher found that program hosting a Jira Data Center instance running version 8.20.6, and tested against it. A bug bounty program is an arrangement where an organisation invites researchers to test its systems and report flaws, often for a reward.
The only precondition described is the allowlist configuration:
- Type: wildcard expression.
- Expression used:
https://*.sim4n6.club - Allow incoming, allow anonymous users.
"Allow incoming" means the allowlist entry is used for requests coming into the server. "Allow anonymous users" means a user does not need to be logged in for the entry to apply. Together these mean the endpoint could be reached without an account.
The report was submitted on 18 May 2022 under the target Jira Software Data Center, category Web App. It carries the VRT classification Broken Access Control (BAC) > Server-Side Request Forgery (SSRF) > Internal High Impact, and priority P4. VRT is a shared taxonomy for labelling vulnerabilities so reports can be compared. The report lists priority P4.
Finding it
The starting point was the gadget endpoint /plugins/servlet/gadgets/makeRequest. A gadget is a small embeddable feature, and this endpoint is the part that fetches remote URLs on the server's behalf. Because the server makes the request, the endpoint is a natural SSRF surface, and Atlassian guards it with the allowlist described above.
The mismatch is between what the wildcard expression is documented to mean and what the parser actually accepts. A parser is the piece of code that reads the URL and decides whether it matches the pattern. If * matches one or more characters and the rest of the pattern is sim4n6.club, then any URL whose host portion ends in sim4n6.club should pass. The researcher found that URLs where the string sim4n6.club appears in the path or the query string also passed, even though the request went to a completely different domain.
Two shapes are given in the report:
https://anydomain.com?www.sim4n6.club
Line by line:
https://is the scheme, telling the server to use secure HTTP.anydomain.comis the host, the machine the request will actually go to. It has nothing to do withsim4n6.club.?www.sim4n6.clubis the query string. It is just text passed toanydomain.com. It contains the allowlisted string, which is what makes the check pass.
https://anydomain.com?r=www.sim4n6.club
Line by line:
https://is the scheme again.anydomain.comis again the real destination host.?r=www.sim4n6.clubis a query string with a parameter namedrwhose value iswww.sim4n6.club. The allowlisted text sits in the value.
In both, the host is anydomain.com and the allowlisted string sits in the query string. The allowlist check appears to be satisfied by the presence of the pattern in the URL rather than by a match against the parsed host, so the request is sent to the attacker-chosen domain.
Exploitation
Step 1: Confirm the endpoint blocks a non-matching host
The researcher first sent a request to the OAST catcher, which came back as 403 forbidden. This step matters because it proves the control exists and works when the URL does not contain the allowed text. Without this baseline, a later success would not show that anything had been bypassed.
Step 2: Put the allowlisted string in the query string
The next request used a URL similar to https://xxxxxxxxxx.oastify.com?r=www.sim4n6.club. The host is the OAST catcher, and the allowlisted string is in the query parameter r. This request returned 200 OK, and the researcher was able to retrieve the response body and headers.
https://xxxxxxxxxx.oastify.com?r=www.sim4n6.club
Line by line:
https://is the scheme.xxxxxxxxxx.oastify.comis the host, the OAST catcher. It is entirely outsidesim4n6.club.?r=www.sim4n6.clubis the query string, carrying the text the allowlist is looking for.
The important parts are the host, which is entirely outside sim4n6.club, and the query string, which carries the text the allowlist is looking for. The server-side fetch went to the OAST catcher, and the endpoint returned what the catcher sent back, including headers. That is the full SSRF primitive: the server makes the request and the response is relayed to the caller. A primitive here means the basic capability, the building block an attacker can then use.
Step 3: Note the freedom the primitive gives
According to the report, the SSRF permits requests using any HTTP method, with any custom headers, to any internal endpoint, subject to the conditions above. The report does not enumerate specific internal targets or show responses from them.
Root cause
The allowlist is configured as a wildcard expression, and the check that enforces it does not restrict the match to the host component of the URL. A URL such as https://anydomain.com?r=www.sim4n6.club contains the allowlisted pattern, so the check passes, but the request is directed at anydomain.com. The wildcard expression is respected in the sense that the string matches, yet the domain the request actually reaches is not the one the administrator intended to authorise.
Because the string sim4n6.club can be placed in a path or a query, an attacker controls the destination while still satisfying the pattern. The existing defence, the allowlist itself, therefore does not stop the request: it is the allowlist's parsing that is bypassed. The report frames this as a possible bypass of CVE-2019-8451, and notes that a Confluence product is also concerned. Whether the underlying code is the same as in that CVE is not established in the report.
Impact
An attacker who can reach the makeRequest endpoint can induce the Jira server to issue requests to arbitrary external or internal destinations, with any HTTP method and any custom headers, and can read the response body and headers. The report classifies this as a full SSRF and as Internal High Impact under the VRT. The conditions are the ones stated: the wildcard allowlist entry, incoming requests allowed, and anonymous users allowed. The report does not demonstrate access to a specific internal service, so the concrete internal reach is not shown.
Fix
The report does not describe a fix or a vendor response. What the analysis implies is that the allowlist check should match against the parsed host of the URL, not against the URL string as a whole, so that a pattern such as https://*.sim4n6.club cannot be satisfied by text in a path or query string. Whether Atlassian changed the check, the documentation, or both is not stated in the report.
Variants to test
- Query-string placement: send a request to an attacker-controlled host with the allowlisted string as a query value, for example
?r=www.example.comwhereexample.comis the allowlisted domain. A positive result is a200response from the attacker host where a request to the same host without the string returns403. - Path placement: put the allowlisted string in the path, such as
https://attacker.tld/www.example.com. A positive result is the same asymmetry between the two requests. - Userinfo and subdomain tricks: try the allowlisted string in the userinfo portion or as a prefix of the host. A positive result is a request that reaches the attacker host while the allowlist check passes.
- Method and header freedom: once a bypass works, repeat with non-GET methods and custom headers to see whether the endpoint forwards them. A positive result is the OAST server receiving the chosen method and headers.
- Other wildcard entries: test any allowlist entry containing
*the same way, since the flaw is in how the wildcard is matched rather than in the specific domain.
Hunting notes
This kind of bug hides wherever an allowlist or denylist is expressed as a wildcard or substring pattern and enforced against a raw URL string. Gadget and proxy endpoints that fetch remote URLs on the server's behalf are the obvious candidates, and Jira's /plugins/servlet/gadgets/makeRequest is one example. During recon, look for features that accept a URL and return content from it, and for configuration pages that describe allowlists in terms of wildcards. The signal is a documented pattern that should constrain the host but that a parser might apply to the whole URL.
The researcher showed impact with two requests to the OAST catcher: one returned 403 forbidden, and one with the allowlisted string in the query string returned 200 OK with the response body and headers. That contrast demonstrates both that the control exists and that it can be bypassed, without needing to reach a specific internal service.
Glossary
- Allowlist: a list of things that are permitted, with everything else refused.
- Anonymous user: a visitor who is not logged in.
- API: a defined way for one piece of software to ask another for data or actions.
- Atlassian: the company that makes Jira and Confluence.
- Bug bounty program: an arrangement where an organisation invites researchers to test its systems and report flaws, often for a reward.
- Confluence: an Atlassian product for documentation and wikis.
- CVE: Common Vulnerabilities and Exposures, a public identifier for a known security flaw.
- Denylist: a list of things that are forbidden, with everything else allowed.
- Endpoint: a specific address on a server that accepts requests and does something.
- Gadget: a small embeddable feature inside a web application.
- Header: a labelled piece of extra information sent with an HTTP request or response.
- Host: the part of a URL that names the machine being contacted.
- HTTP: the protocol browsers and servers use to exchange requests and responses.
- HTTPS: HTTP carried over an encrypted connection.
- Jira: Atlassian's project and issue tracking software.
- Jira Software Data Center: the version of Jira that organisations run on their own servers.
- Method: the part of an HTTP request that says what kind of action is wanted, such as
GET. - OAST: out-of-band application security testing, a technique that uses an external catcher to observe requests a server makes.
- Parser: the code that reads a value, such as a URL, and interprets its parts.
- Path: the part of a URL after the host that names a resource on that host.
- Priority P4: the lowest priority band in the VRT scheme used here.
- Query string: the part of a URL after a
?, carrying extra data to the host. - Recon: reconnaissance, the phase of gathering information about a target before testing.
- Scheme: the part of a URL that names the protocol, such as
https. - SSRF: Server-Side Request Forgery, tricking a server into making a request the attacker chooses.
- Status code: the three-digit number at the start of an HTTP response, such as
200or403. - Subdomain: a host that sits under a larger domain, such as
appunderexample.com. - Userinfo: the optional username and password portion that can appear before the host in a URL.
- VRT: a shared taxonomy for labelling vulnerabilities so reports can be compared.
- Wildcard: a special character, here
*, that stands in for one or more other characters.