Skip to content
XSS Disclosed report Beginner

Reflected Cross Site Scripting while connection with Slack integration in Jira Server

A reflected cross-site scripting vulnerability existed in the Slack integration of Jira Server. An attacker could craft a URL that, when visited, would execute arbitrary JavaScript in the victim's browser, potentially stealing cookies or other credentials.

mr_edwards Follow

Originally disclosed on Bugcrowd

Bounty$300 Medium View original
  • Accepted in 19 days
  • Fixed in 19 days
  • Disclosed after 14 months

Summary by Atlassian

Reflected Cross Site Scripting Attack in Slack integration in JIRA Software Server.

Summary by mr_edwards

There was an XSS in Slack integration in JIRA.

Report details

  • Submitted

    15 Nov 2019 11:49:19 UTC

  • Target Location

    Jira Core Data Center

  • Target category

    Web App

  • VRT

    Cross-Site Scripting (XSS) > Reflected > Non-Self

  • Priority

    P3

  • Bug URL

    [jira_host]/slack/oauth/redirect/THMAXLURM%3Cimg%20src=x%20onerror=alert%601%60%3E

  • Description

    There is an XSS vulnerability in the JIRA server which could lead to the stealing of user credentials like cookies and more.

    Steps to reproduce:

    1. Go to the following URL : [jira_host]/slack/oauth/redirect/THMAXLURM%3Cimg%20src=x%20onerror=alert%601%60%3E
    2. You will get promted with '1' (XSS fired).
  • Extra info

    Added screenshot.

The original report as published on Bugcrowd, by Atlassian. Images and videos are our own copies; raw HTML is shown as text. View it on Bugcrowd.

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. 4 min read.

Context

Jira Software Server (the report also names the asset as Jira Core Data Center) ships a Slack integration. Part of that integration is an OAuth flow, and the flow exposes a redirect endpoint under the path /slack/oauth/redirect/. The endpoint takes a value in the URL path, and a crafted value placed there executes as script in the browser. That reflection is the whole basis of this finding: a reflected cross-site scripting issue in the Slack integration of Jira.

Atlassian's own summary describes it as a reflected cross-site scripting attack in the Slack integration in JIRA Software Server. The researcher's summary is equally short: there was an XSS in the Slack integration in JIRA.

Setup

The report gives very little about the environment. It does not state the Jira version, the Slack configuration, the account or role needed, or any browser or tool used. What it does record is the submission metadata:

Field Value
Submitted 15 Nov 2019 11:49:19 UTC
Target location Jira Core Data Center
Target category Web App
VRT Cross-Site Scripting (XSS) > Reflected > Non-Self
Priority P3
Severity Medium
Bounty 300.00 USD
Disclosed 2021-01-21

The VRT classification recorded in the report is Reflected > Non-Self.

Finding it

The researcher does not describe the recon or reasoning that led to the endpoint. The report presents the finding directly: a crafted value in the Slack OAuth redirect path executes as script. The payload placed in the path is a percent-encoded <img> tag with an onerror handler, so once the browser decodes it and parses it as markup, the broken image source triggers the handler.

Exploitation

Step 1: request the crafted redirect URL

The researcher instructs the reader to visit the following URL, where [jira_host] stands for the Jira host:

Text
[jira_host]/slack/oauth/redirect/THMAXLURM%3Cimg%20src=x%20onerror=alert%601%60%3E

The value after /slack/oauth/redirect/ is THMAXLURM followed by the encoded payload. Decoded, the payload is:

%3C and %3E are the angle brackets that open and close the tag, %20 is the space separating attributes, and %60 is the backtick used to delimit the argument to alert. The src=x points at a resource that will not load, which fires the onerror handler, and the handler calls alert with the value 1.

Step 2: observe the script firing

The report says that on visiting the URL you are prompted with 1, confirming the XSS fired.

The report adds no further detail about the response body, status code, headers or content type, so the exact reflection context is not documented beyond the fact that the markup executes.

Root cause

The report does not analyse the server-side code. What can be said from the behaviour is that a percent-encoded tag in the path after /slack/oauth/redirect/ becomes live markup in the page. Why the existing output handling did not stop it is not described; likely the redirect handler builds its response from the path value without applying the framework's usual escaping, but the report does not confirm this.

Impact

The researcher states that the vulnerability could lead to the stealing of user credentials such as cookies and more. In practice that means an attacker who can get a victim to open a crafted link runs script in the victim's Jira origin, with access to whatever that origin exposes to script, including session cookies that are not protected from JavaScript. The report does not demonstrate cookie theft or any other post-exploitation step; the proof stops at the alert. The conditions are the usual ones for reflected XSS: the victim must follow the link, and the payload must survive whatever processing happens between the URL and the response.

Fix

The change that addresses this class of bug is to encode or reject the value taken from the redirect path before it is placed in the response, so that <, >, quotes and similar characters cannot become markup, and to apply the same output encoding consistently across the Slack OAuth endpoints.

Variants to test

  1. Other segments of the Slack OAuth flow. Try the same encoded <img> payload in any path or query parameter the flow accepts, such as state or redirect values. A positive result is the handler firing when the page loads.
  2. Different reflection contexts. If the value lands inside an attribute rather than between tags, try breaking out with a quote followed by an event handler. A positive result is script execution rather than inert text.
  3. Encoding bypasses. If a simple %3C is filtered, try double encoding or alternative encodings of the angle brackets. A positive result is the browser receiving decoded markup.
  4. Other integrations with redirect endpoints. Jira and Confluence integrations that echo callback or redirect values are worth the same test. A positive result is the same reflected execution.

Hunting notes

OAuth and integration callback paths are a good place to look because they often echo values from the URL for error messages or redirects, and those echoes are easy to miss in review. During recon, map endpoints under paths such as /slack/oauth/ and note any that reflect a path segment or parameter back into the response. Send a harmless marker first to see whether and where it appears, then test whether HTML metacharacters survive. The proof was a single URL and a screenshot of the alert firing, classified as Reflected > Non-Self, with a P3 priority and a 300 USD bounty.

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. 9 min read.

What happened, in plain words

Jira is a tool that teams use to track tasks and bugs. It can be connected to Slack, a chat app, so that updates in Jira show up in Slack and the other way round. To make that connection, Jira uses something called OAuth, which is a standard way for two websites to agree that one is allowed to talk to the other on your behalf. Part of that connection involves a redirect address on the Jira server.

That redirect address lives under a path on the Jira server that looks like /slack/oauth/redirect/. A crafted value placed after that path in the URL executes as script in the browser. If the value written back contains HTML, the browser treats it as part of the page rather than as harmless text. That is the bug: a reflected cross-site scripting (XSS) issue in the Slack integration of Jira.

Atlassian's own summary of the report calls it a reflected cross-site scripting attack in the Slack integration in JIRA Software Server. The researcher's summary is just as short: there was an XSS in the Slack integration in JIRA.

The basics you need before reading the steps

A few ideas come up again and again, so here they are from zero.

  • HTML is the language web pages are written in. Text between angle brackets, like <img ...>, is a tag: an instruction to the browser, not text to display. An <img> tag tells the browser to load a picture.
  • JavaScript is the programming language browsers run inside pages. It can read things the page can see, including some cookies, and it can show pop-ups.
  • XSS (cross-site scripting) means getting your own JavaScript to run inside someone else's web page, in that site's context. The browser cannot tell your script from the site's own script, so your script gets the same access the site's script has.
  • Reflected XSS is the specific kind where the malicious value travels in the URL you send, the server copies it into the response, and the browser runs it. Nothing is stored on the server; the attack lives in the link.
  • Percent-encoding is how special characters are written inside a URL. A URL cannot contain spaces or angle brackets directly, so they are written as a percent sign and two hexadecimal digits. %3C is <, %3E is >, %20 is a space, and %60 is a backtick. The browser decodes these before using the value.
  • A cookie is a small piece of data a site stores in your browser and sends back with every request, so the site can recognise you. Session cookies are the common example: whoever holds one can act as you. That is why stealing one matters.
  • An event handler is an attribute on an HTML tag that names JavaScript to run when something happens, such as a click or a failed image load. onerror runs when the browser fails to load the resource named in src.
  • alert is a JavaScript function that shows a pop-up box with a message. Researchers use it as a harmless proof that script ran.
  • An API is a way for one piece of software to talk to another, like a service counter: you hand over a request in an agreed format and get an answer back. The Slack integration talks to Jira through such interfaces, and the OAuth redirect is one of the addresses involved.
  • OAuth is the standard behind "Log in with..." buttons. You approve a connection on one site, and the browser is redirected back to the other site with a value that proves the approval happened.

The setup

The report says very little about the environment. It does not state the Jira version, how Slack was configured, which account or role was needed, or which browser or tool was used. What it does record is the submission metadata:

Field Value
Submitted 15 Nov 2019 11:49:19 UTC
Target location Jira Core Data Center
Target category Web App
VRT Cross-Site Scripting (XSS) > Reflected > Non-Self
Priority P3
Severity Medium
Bounty 300.00 USD
Disclosed 2021-01-21

A word on the VRT line. VRT is the Vulnerability Rating Taxonomy, a shared list of bug types used by bug bounty platforms so that everyone uses the same names. The entry here is Reflected > Non-Self. "Reflected" we covered above. "Non-Self" means the payload does not have to be shown only back to the person who sent it: a crafted link can be sent to another user and will run in their browser. That is what makes a reflected bug worth reporting rather than a curiosity.

Finding it

The researcher does not describe the recon or the reasoning that led to the endpoint. The report presents the finding directly: the Slack OAuth redirect path reflects a value taken from the URL, and that value can carry HTML. The payload placed in the path is a percent-encoded <img> tag with an onerror handler. Once the browser decodes it and parses it as markup, the broken image source triggers the handler.

Exploitation

Step 1: request the crafted redirect URL

The researcher instructs the reader to visit the following URL, where [jira_host] stands for the Jira host:

Text
[jira_host]/slack/oauth/redirect/THMAXLURM%3Cimg%20src=x%20onerror=alert%601%60%3E

Line by line, in plain words:

  • [jira_host] is a placeholder for the address of the Jira server, for example the domain your organisation uses.
  • /slack/oauth/redirect/ is the path of the endpoint: the part of the Slack OAuth flow that sends the browser back to Jira.
  • THMAXLURM is a string of characters placed at the start of the value.
  • %3Cimg%20src=x%20onerror=alert%601%60%3E is the payload, percent-encoded so it can travel inside a URL.

Decoded, the payload is:

Line by line:

  • <img starts an image tag. The browser now expects attributes and then a closing >.
  • src=x tells the browser to load the image from a location called x. No such image exists, so the load will fail.
  • onerror=alert1`` is the event handler. Because the image failed to load, the browser runs the JavaScript after the equals sign.
  • alert1`` calls the pop-up function with the value 1. The backticks are just another way to write a text value in JavaScript, equivalent to quotes.
  • > closes the tag.

Why this shape? The researcher needs the browser to run JavaScript without any click from the user. A broken image is a reliable way to do that: the failure happens on its own, immediately, and the onerror handler fires. The alert is deliberately harmless; it proves script execution without doing damage.

Step 2: observe the script firing

The report says that on visiting the URL you are prompted with 1, confirming the XSS fired.

The report adds no further detail about the response body, status code, headers or content type, so the exact place in the page where the value is reflected is not documented beyond the fact that the markup executes.

Root cause

The report does not analyse the server-side code. What can be said from the behaviour is that a percent-encoded tag in the path after /slack/oauth/redirect/ becomes live markup in the page. Why the existing output handling did not stop it is not described. A likely explanation is that the redirect handler builds its response from the path value without applying the framework's usual escaping, but the report does not confirm this.

Impact

The researcher states that the vulnerability could lead to the stealing of user credentials such as cookies and more. In practice that means an attacker who can get a victim to open a crafted link runs script in the victim's Jira origin, with access to whatever that origin exposes to script, including session cookies that are not protected from JavaScript. The report does not demonstrate cookie theft or any other follow-up step; the proof stops at the alert. The conditions are the usual ones for reflected XSS: the victim must follow the link, and the payload must survive whatever processing happens between the URL and the response.

Fix

The change that addresses this class of bug is to encode or reject the value taken from the redirect path before it is placed in the response, so that <, >, quotes and similar characters cannot become markup, and to apply the same output encoding consistently across the Slack OAuth endpoints.

Variants to test

  1. Other segments of the Slack OAuth flow. Try the same encoded <img> payload in any path or query parameter the flow accepts, such as state or redirect values. A positive result is the handler firing when the page loads.
  2. Different reflection contexts. If the value lands inside an attribute rather than between tags, try breaking out with a quote followed by an event handler. A positive result is script execution rather than inert text.
  3. Encoding bypasses. If a simple %3C is filtered, try double encoding or alternative encodings of the angle brackets. A positive result is the browser receiving decoded markup.
  4. Other integrations with redirect endpoints. Jira and Confluence integrations that echo callback or redirect values are worth the same test. A positive result is the same reflected execution.

Hunting notes

OAuth and integration callback paths are a good place to look because they often echo values from the URL for error messages or redirects, and those echoes are easy to miss in review. During recon, map endpoints under paths such as /slack/oauth/ and note any that reflect a path segment or parameter back into the response. Send a harmless marker first to see whether and where it appears, then test whether HTML metacharacters survive. The proof was a single URL and a screenshot of the alert firing, classified as Reflected > Non-Self, with a P3 priority and a 300 USD bounty.

Glossary

  • API: an agreed way for one piece of software to send requests to another and receive answers.
  • Attribute: a setting written inside an HTML tag, such as src or onerror.
  • Bounty: money paid by a bug bounty programme for a valid report.
  • Cookie: a small piece of data a site stores in your browser and receives back on later requests, often used to recognise your session.
  • Cross-site scripting (XSS): getting your own JavaScript to run inside another site's page, in that site's context.
  • Endpoint: a specific address on a server that accepts requests, such as the Slack OAuth redirect path.
  • Event handler: an HTML attribute naming JavaScript to run when something happens, such as an image failing to load.
  • HTML: the markup language web pages are written in, where angle-bracketed tags instruct the browser.
  • JavaScript: the programming language browsers run inside pages.
  • OAuth: a standard for letting two sites connect on your behalf, involving a redirect back to the first site after you approve.
  • onerror: an event handler that runs when a resource fails to load.
  • Payload: the crafted value an attacker sends, here the encoded <img> tag.
  • Percent-encoding: writing special characters in a URL as a percent sign plus two hexadecimal digits, such as %3C for <.
  • P3: the priority level recorded in the report, alongside a medium severity.
  • Recon: the information-gathering phase of testing, mapping what a target exposes.
  • Redirect: sending the browser from one address to another, here back to Jira after Slack approval.
  • Reflected XSS: XSS where the malicious value travels in the request and is copied into the response, with nothing stored on the server.
  • Session cookie: a cookie that identifies your logged-in session; whoever holds it can act as you.
  • Severity: the rating of how serious a bug is, here medium.
  • Slack: a chat application that Jira can be connected to.
  • VRT: Vulnerability Rating Taxonomy, a shared list of bug type names used by bug bounty platforms.
  • VRT Non-Self: a reflected bug that can be delivered to another user through a link, not only shown back to the sender.

More by mr_edwards

View all

3 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.

Cross-site scripting (XSS)

The lesson behind this report.

Script an attacker supplies runs in another user's browser, on the target's origin, with that user's session.