Skip to content
Info disclosure Write-up Advanced

Leaking internal issues from linked Jira at Atlassian Confluence Server | by YSRC

The Confluence Server jira-chart-proxy endpoint fetched a pie chart from a linked Jira instance for a supplied JQL query, and the returned image size differed depending on whether the query matched any issues. An attacker could use this size difference to test JQL queries and leak details of issues in the linked Jira application.

yeuchimse Follow

Published on yeuchimse.com

Bounty$600 View original

The /plugins/servlet/jira-chart-proxy endpoint in the Server version of Confluence, when being called, will make a GET request to the /rest/gadget/1.0/piechart/generate endpoint of the linked Jira application in order to get the corresponding pie chart of the given JQL query. If this is the first time you hear about…

yeuchimse (@yeuchimse), on yeuchimse.com

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 3 min read.

Context

Atlassian products can be linked together through a bundled app called Application Links (sometimes called "app links"). It lets you set up links, share information, and provide access to certain resources or functionality across multiple Atlassian products. Linking Confluence to another application lets you include information from that application in pages or blogs you create in Confluence. For example, you could link Confluence to Jira Software and display issues on a Confluence page using the Jira Issues Macro.

The feature at the centre of this write-up is the /plugins/servlet/jira-chart-proxy endpoint in the Server version of Confluence. When it is called, it makes a GET request to the /rest/gadget/1.0/piechart/generate endpoint of the linked Jira application in order to get the corresponding pie chart for a given JQL query.

JQL is the query language created for searching issues in Jira more efficiently, especially when a search includes multiple criteria, for example:

Text
status=resolved OR projects="BB" OR assigne=ycs OR text ~ "yeuchism*"

Setup

The issue was exploited on Jira Software 8.3.0 and Confluence 6.15.7. The researcher submitted it on Bugcrowd on 23 Jul 2019, and it was resolved on 21 Nov 2019 with a bounty of $600.

One precondition matters for reproduction: because of the new SameSite behaviour implemented in recent versions of Chrome, the victim's cookies and session will not be sent with cross-origin requests. To reproduce the issue, the researcher advises using Firefox to avoid that trouble.

Finding it

The proxy endpoint returns an image. When no results match the JQL query, one image is returned; otherwise a chart is returned that looks like this:

Because of the Same-Origin Policy (SOP), we cannot read the content of images hosted on other origins. However, SOP does not prevent us from getting the dimensions of those images, presumably for styling purposes. That means an attacker can abuse the /plugins/servlet/jira-chart-proxy endpoint to determine whether a provided JQL matches any issues or not, based on the dimensions of the returned image: 400×250 versus 400×35. In short, this is an XS-Search vulnerability, with the ability to leak details of the issues from the linked Jira application.

The hardest part of exploiting the issue is that you need to know the Application ID of the linked Jira, which is an unguessable value. That missing piece could be found on an unauthenticated endpoint of Confluence, which has since been fixed.

Exploitation

Step 1: Confirm the proxy behaviour

Call the /plugins/servlet/jira-chart-proxy endpoint with a JQL query. Confluence forwards the request to the linked Jira application's /rest/gadget/1.0/piechart/generate endpoint and returns the resulting pie chart image.

Step 2: Distinguish the two responses

A query with no matching issues returns one image; a query with matches returns the chart shown above. The two responses differ in dimensions: 400×250 versus 400×35.

Step 3: Read the dimensions cross-origin

Load the proxy endpoint as an image from an attacker-controlled page. SOP blocks reading the image content, but the dimensions remain readable, so the attacker learns whether the JQL matched any issues.

Step 4: Obtain the Application ID

The Application ID of the linked Jira is required and is unguessable. It could be retrieved from an unauthenticated endpoint of Confluence, which has since been fixed. The report does not give the path of that endpoint.

Step 5: Leak issue details

With the Application ID in hand, the attacker submits JQL queries through the proxy and observes the image dimensions for each, turning the endpoint into an oracle for the contents of the linked Jira application.

Root cause

The proxy endpoint returns a chart whose dimensions depend on whether the JQL query matches any issues, and the browser exposes those dimensions to cross-origin pages even though SOP blocks reading the image itself. The Application ID that the endpoint needs could be found on an unauthenticated Confluence endpoint, which has since been fixed. The report does not describe the server-side code, so the exact implementation mistake is not stated.

Impact

An attacker can determine whether a provided JQL query matches any issues in the linked Jira application, and in that way leak details of those issues. Exploitation requires a linked Jira application and knowledge of its Application ID; with Chrome's SameSite behaviour, the researcher recommends Firefox for reproduction.

Fix

The unauthenticated Confluence endpoint that exposed the Application ID has been fixed.

Variants to test

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 11 min read.

What happened, in plain words

Imagine two offices of the same company, Confluence and Jira. Confluence is where people write pages and documents; Jira is where people track tasks and bugs, which Jira calls "issues". The two can be connected so that a Confluence page can show a live chart of Jira issues. That connection is made by a feature called Application Links.

The problem was that one Confluence web address, /plugins/servlet/jira-chart-proxy, produced a picture whose size depended on the answer to a question about Jira. A website run by an attacker could load that picture and measure it, without being allowed to see what is inside it. By measuring the size, the attacker could learn whether a search in Jira found any issues. Repeating the trick with different searches lets the attacker slowly extract information from Jira. This kind of attack is called XS-Search.

The researcher reported it on Bugcrowd on 23 Jul 2019. It was resolved on 21 Nov 2019 and paid a bounty of $600.

Background: what Confluence, Jira and Application Links are

Confluence and Jira are both products made by Atlassian. Confluence is a place to write and share pages; Jira is a place to record and follow work items, called issues. Each issue has fields such as a status (for example resolved), a project, an assignee and free text.

Application Links (sometimes called "app links") is a bundled app that lets you set up links, share information, and provide access to certain resources or functionality across multiple Atlassian products. Linking Confluence to another application lets you include information from that application in pages or blogs you create in Confluence. For example, you could link Confluence to Jira Software and display issues on a Confluence page using the Jira Issues Macro.

A macro, in this context, is a small building block you drop into a Confluence page that fetches or displays something. The Jira Issues Macro shows Jira issues on a Confluence page. Behind the scenes, Confluence has to ask Jira for that data, and that is where the endpoint in this report comes in.

Background: endpoints, requests and APIs

An endpoint is simply a web address on a server that does a particular job, like a service counter in a large building: you go to the right counter with the right request and you get a specific service. When your browser visits an address, it sends a request; the server sends back a response, which might be a web page, some data, or an image.

An API (Application Programming Interface) is a set of such endpoints designed for software to talk to software rather than for a person to click around. Think of it as the drive-through window of a restaurant: you do not go inside, you state your order at a fixed window and get a standard result back.

A GET request is the simplest kind of request: it asks the server to give you something, without changing anything on the server. It is like asking "please show me this".

Background: JQL, the search language of Jira

JQL stands for Jira Query Language. It is a query language created for searching issues in Jira more efficiently, especially when your search includes multiple criteria. A query is just a written question, like a search box entry, but with a strict grammar so a computer can understand it exactly.

Here is an example of a JQL query:

Text
status=resolved OR projects="BB" OR assigne=ycs OR text ~ "yeuchism*"

Reading it piece by piece:

  • status=resolved asks for issues whose status is resolved.
  • OR means "or": an issue qualifies if any of the joined conditions is true.
  • projects="BB" asks for issues in the project named BB.
  • assigne=ycs asks for issues assigned to the user ycs.
  • text ~ "yeuchism*" asks for issues whose text contains something starting with yeuchism; the ~ means a text match and the * is a wildcard standing for any ending.

So the whole line means: give me issues that are resolved, or in project BB, or assigned to ycs, or whose text starts with yeuchism. You can read more about JQL in Atlassian's own guides; the point here is only that JQL is a precise way to ask Jira questions.

The endpoint at the centre of the report

The feature at the centre of this write-up is the /plugins/servlet/jira-chart-proxy endpoint in the Server version of Confluence. "Server version" means the edition that a company installs and runs on its own machines, as opposed to the cloud-hosted edition.

When this endpoint is called, it makes a GET request to the /rest/gadget/1.0/piechart/generate endpoint of the linked Jira application in order to get the corresponding pie chart for a given JQL query. In plain words: Confluence acts as a middleman. You ask Confluence for a chart; Confluence turns around and asks the linked Jira to draw it; then Confluence hands you the picture.

A proxy, in computing, is exactly that: a middleman that forwards a request on your behalf and returns the answer. A pie chart is a round diagram divided into slices, each slice a share of a total.

The observation: the picture changes size

The proxy endpoint returns an image. When no results match the JQL query, one image is returned; otherwise a chart is returned that looks like this:

The image above is the chart returned when results match the query. The report also states that a query with no matches produces a different image, and that the two differ in size: 400×250 versus 400×35.

Why a website can measure an image but not read it

Browsers enforce a rule called the Same-Origin Policy, usually shortened to SOP. An origin is the combination of protocol, host and port, roughly "which site" a resource belongs to. SOP says that a page from one origin may not read the content of resources from another origin. Think of it as a rule that you may look at a sealed parcel from another shop but you may not open it.

Because of SOP, we cannot read the content of images hosted on other origins. However, SOP does not prevent us from getting the dimensions of those images, presumably for styling purposes. A web page needs to know how big an image is so it can lay out the page around it, so the browser reports the width and height even for images it will not let the page inspect.

That gap is the whole bug. An attacker can abuse the /plugins/servlet/jira-chart-proxy endpoint to determine whether a provided JQL matches any issues or not, based on the dimensions of the returned image: 400×250 versus 400×35. In short, this is an XS-Search vulnerability, with the ability to leak details of the issues from the linked Jira application.

XS-Search means "cross-site search": using a website's own search feature as a yes/no detector from another site. The attacker never sees the search results, only a side effect such as an image size, a timing difference or a redirect. Each yes/no answer is one bit of information, and enough questions add up to a picture of the data.

The obstacle: the Application ID

The hardest part of exploiting the issue is that you need to know the Application ID of the linked Jira, which is an unguessable value. An Application ID is an identifier that Confluence uses to know which linked application a request is meant for; without it, the proxy does not know where to forward the chart request.

That missing piece could be found on an unauthenticated endpoint of Confluence, which has since been fixed. "Unauthenticated" means the endpoint answered without anyone logging in, so an attacker did not need an account. The report does not give the path of that endpoint.

Exploitation, step by step

Step 1: Confirm the proxy behaviour

Call the /plugins/servlet/jira-chart-proxy endpoint with a JQL query. Confluence forwards the request to the linked Jira application's /rest/gadget/1.0/piechart/generate endpoint and returns the resulting pie chart image.

Why this step: before building any attack, you check that the middleman really does what you think. If Confluence did not forward the query to Jira, there would be nothing to measure.

Step 2: Distinguish the two responses

A query with no matching issues returns one image; a query with matches returns the chart shown above. The two responses differ in dimensions: 400×250 when the query matches, 400×35 when it does not.

Why this step: an attack needs a reliable signal. Here the signal is the height of the image. Two clearly different sizes mean the attacker can tell the two outcomes apart without any ambiguity.

Step 3: Read the dimensions cross-origin

Load the proxy endpoint as an image from an attacker-controlled page. SOP blocks reading the image content, but the dimensions remain readable, so the attacker learns whether the JQL matched any issues.

Why this step: this is the trick that turns a normal feature into a leak. The attacker's page never sees the chart, only its size, and the size is enough to answer the question.

Step 4: Obtain the Application ID

The Application ID of the linked Jira is required and is unguessable. It could be retrieved from an unauthenticated endpoint of Confluence, which has since been fixed.

Why this step: the proxy needs to know which linked application to talk to. Without the ID the request cannot be aimed at the right Jira, so finding the ID is what makes the attack practical.

Step 5: Leak issue details

With the Application ID in hand, the attacker submits JQL queries through the proxy and observes the image dimensions for each, turning the endpoint into an oracle for the contents of the linked Jira application.

Why this step: an oracle, in security, is any system that answers a yes/no question about secret data. Ask "does an issue exist with this property?" often enough, varying one detail each time, and the answers reveal the data itself.

A note on cookies and browsers

A cookie is a small piece of data a website stores in your browser so it can recognise you on later requests; a session cookie is what keeps you logged in. When your browser loads something from another site, it may or may not attach your cookies for that site, depending on the browser's rules.

Because of the new SameSite behaviour implemented in recent versions of Chrome, the victim's cookies and session will not be sent with cross-origin requests. SameSite is a cookie setting that controls whether cookies travel with requests made from other sites. To reproduce the issue, the researcher advises using Firefox to avoid that trouble.

This matters because the attack depends on Confluence treating the request as coming from a logged-in user. If the browser withholds the session cookie, the proxy has nothing to work with.

Root cause

The proxy endpoint returns a chart whose dimensions depend on whether the JQL query matches any issues, and the browser exposes those dimensions to cross-origin pages even though SOP blocks reading the image itself. The Application ID that the endpoint needs could be found on an unauthenticated Confluence endpoint, which has since been fixed. The report does not describe the server-side code, so the exact implementation mistake is not stated.

Impact

An attacker can determine whether a provided JQL query matches any issues in the linked Jira application, and in that way leak details of those issues. Exploitation requires a linked Jira application and knowledge of its Application ID; with Chrome's SameSite behaviour, the researcher recommends Firefox for reproduction.

Fix

The unauthenticated Confluence endpoint that exposed the Application ID has been fixed.

Variants to test

Timeline

  • 23 Jul 2019: Submission created on Bugcrowd.
  • 21 Nov 2019: The issue got resolved (bounty: $600).

Glossary

  • Application Links (app links): a bundled Atlassian app that connects Atlassian products so they can share information and features.
  • Application ID: an identifier Confluence uses to refer to a specific linked application; the report calls it unguessable.
  • API: a set of web addresses designed for software to talk to software.
  • Bounty: a reward paid by a company for a valid security report.
  • Bugcrowd: the bug bounty platform where the report was submitted.
  • Chart: a picture that represents data, here a pie chart with slices.
  • Confluence: Atlassian's product for writing and sharing pages and documents.
  • Cookie: a small piece of data stored by your browser for a website, used to recognise you on later requests.
  • Cross-origin request: a request made from a page on one origin to a resource on a different origin.
  • Endpoint: a specific web address on a server that performs a particular job.
  • GET request: a request that asks a server to return something without changing anything on it.
  • Image dimensions: the width and height of an image, which a browser exposes to a page for layout purposes.
  • Issue: Jira's name for a work item such as a task or a bug.
  • Jira: Atlassian's product for tracking issues.
  • Jira Issues Macro: a Confluence building block that displays Jira issues on a Confluence page.
  • JQL (Jira Query Language): the query language used to search issues in Jira.
  • Macro: a reusable building block you insert into a Confluence page.
  • Oracle: any system that answers yes/no questions about secret data, which an attacker can use to extract it.
  • Origin: the combination of protocol, host and port that identifies which site a resource belongs to.
  • Pie chart: a round diagram divided into slices, each showing a share of a total.
  • Proxy: a middleman that forwards a request on your behalf and returns the answer.
  • Query: a written question used to search data, here a JQL expression.
  • Same-Origin Policy (SOP): the browser rule that a page from one origin may not read the content of resources from another origin.
  • SameSite: a cookie setting that controls whether cookies are sent with requests made from other sites.
  • Server version: the edition of a product that a company installs and runs on its own machines.
  • Session cookie: the cookie that keeps you logged in to a website.
  • Unauthenticated endpoint: a web address that answers without anyone logging in.
  • Victim: the logged-in user whose browser is made to send the requests in an attack.
  • XS-Search: a cross-site search attack that uses a site's search feature as a yes/no detector from another site.
  • Wildcard: a symbol such as * that stands for any characters in a search term.

More by yeuchimse

View all

2 more disclosed reports, best first.

More from Atlassian

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.