Skip to content
XSS Disclosed report Intermediate

Stored XSS in the Jira issue detail pages

GitLab did not sanitise the 'key' field in the JSON response from a Jira API, leading to stored XSS on Jira issue detail pages. An attacker could execute arbitrary JavaScript in a victim's browser, bypassing CSP.

GitLab

Originally disclosed on GitLab

  • Fixed in 4 months
  • Disclosed after 4 months

HackerOne report #1132083 by thornguyen on 2021-03-22, assigned to @ngeorge1:

Report | Attachments | How To Reproduce

Report

Summary

I've found a stored XSS vulnerability in the Jira issue detail pages by exploiting Jira integration. Also, I was able to bypass CSP and gain full javascript execution under gitlab.com context.

Steps to reproduce
  1. Create a Mock API that response this payload when there are requests to path /rest/api/2/issue/POC?expand=renderedFields. You can use https://beeceptor.com/ like my POC video.

  2. In a GitLab project that has premium / ultimate license , go to Settings -> Integrations -> Jira:

  • Tick active at the Enable integration section
  • Input any URL at Web URL field
  • Input the mock API created in Step 1 to the Jira API URL field
  • Click Save changes
  1. Now go to https://gitlab.com/[YOUR_ORGANIZATION]/[YOUR_PROJECT]/-/integrations/jira/issues/POC and you will see a popup.
Impact

Stored-XSS allow attackers to perform arbitrary actions on behalf of victims at client side. And since the JIRA issue detail pages can be made public, this impact a considerable number of GitLab users and visitors.

Examples
  • [REDACTED] (tested in Chrome and Firefox)
What is the current bug behavior?

GitLab doesn't sanitize the key field in the JSON response from Jira API so it leads to stored XSS at the Jira issue detail pages.

[REDACTED]

POC Video

![REDACTED]

What is the expected correct behavior?

GitLab should sanitize key field in the JSON response from Jira API before output to browser.

Output of checks

This bug happens on GitLab.com

Impact

Stored-XSS allow attackers to perform arbitrary actions on behalf of victims at client side. And since the JIRA issue detail pages can be made public, this impact a considerable number of GitLab users and visitors.

Attachments

Warning: Attachments received through HackerOne, please exercise caution! [REDACTED]

How To Reproduce

Please add reproducibility information to this section:

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

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

How it worked

Impact

Stored XSS could allow attackers to perform arbitrary actions on behalf of victims at client side, and since Jira issue detail pages can be made public, this could affect many GitLab users and visitors; the attacker also bypassed CSP.

What the attacker needed

Premium or ultimate GitLab licence; ability to configure Jira integration; victim visits the issue detail page

The fix

GitLab should sanitise the 'key' field in the JSON response from the Jira API before outputting it to the browser.

How it was found

  1. Create a mock API that returns a malicious payload when requested at a specific Jira issue path.
  2. In a GitLab project with a premium or ultimate licence, enable the Jira integration and set the Jira API URL to the mock API.
  3. Visit the Jira issue detail page for the project to trigger the stored XSS popup.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

This is a stored cross-site scripting (XSS) bug. GitLab showed data from an external Jira system without cleaning it first, so malicious code could be saved and run in other users' browsers. That let an attacker act as the victim on the website.

What is XSS?

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

More from GitLab

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.