Skip to content
XSS Disclosed report Beginner

[atlasboard-atlassian-package] Cross-site Scripting (XSS)

The atlasboard-atlassian-package's blockers widget inserts JIRA issue summaries into the dashboard without sanitisation, allowing an attacker who can create or modify JIRA issues to inject client-side JavaScript or HTML. This could execute in the context of the dashboard when it displays the issue.

ermilov Follow

Originally disclosed on HackerOne

  • Triaged in 3 months
  • Fixed in 13 months
  • Disclosed after 13 months

I would like to report XSS in atlasboard-atlassian-package It allows to inject clientside javascript (or HTML) in cases when attacker has opportunity to create or modify issues on JIRA server (e.g bug tracker) which is configured to work with application from module.

Module

module name: atlasboard-atlassian-package version: 0.0.2 npm page: https://www.npmjs.com/package/atlasboard-atlassian-package

Module Description

this is a package ready to be used with Atlasboard. It contains dashboards, widgets and jobs related to Atlassian products.

Module Stats

1 downloads in the last day 9 downloads in the last week 20 downloads in the last month

Vulnerability

Vulnerability Description

atlasboard-atlassian-package is a collection of widgets for atlasboard which is another package and a dashboard framework, 'blockers' widget dedicated to show issues from JIRA with 'Blocked' status (which actually can be used to show any kind of issues because it uses configurable JQL query for requesting data from Jira server) doesn't have proper incoming data sanitization.

Steps To Reproduce:

First of all it requires atlasboard installed that is why steps a from https://www.npmjs.com/package/atlasboard#installation install atlasboard

npm install -g atlasboard

create your dashboard

atlasboard new mywallboard

go to dashboard directory and install atlasboard-atlassian-package

cd mywallboard/
git init
git submodule add https://bitbucket.org/atlassian/atlasboard-atlassian-package packages/atlassian

then configure packages/atlassian/dashboards/example1.json to use Jira server,

...
  "config": {
    "confluence-blockers": {
      "timeout": 30000,
      "retryOnErrorTimes": 3,
      "interval": 120000,
      "jira_server": "https://your-jira-portal.atlassian.net",
      "jql": "project = \"YOUR-PROJECT\" ORDER BY priority DESC"
    },
...

where jira_server - url of your Jira portal jql - query that you want to use for getting jira issues list

then create a ticket in Jira with summary containing payload e.g. test<script>alert(1)</script> F386186

then start your dashboard

atlasboard start

or

node start.js

url dashboard-server:port/example1 will contain payload where dashboard-server - your server location where you host the dashboard port - port of your server where you host the dashboard by default it's localhost:3000

source: https://bitbucket.org/atlassian/atlasboard-atlassian-package/src/289092d890fa764983282d92730f4709a2038be5/widgets/blockers/blockers.js?at=master&fileviewer=file-view-default#blockers.js-44

JavaScript
var $summary = $("<div/>").addClass("issue-summary").append(blocker.summary).appendTo(listItem);

blocker is an issue object recieved from Jira

if an attacker has access for changing issues summary in Jira any kind of markup (HTML / JS) can be injected on the dashboard

Patch

I suppose it's better to use 'text' instead of 'append' here

JavaScript
var $summary = $("<div/>").addClass("issue-summary").text(blocker.summary).appendTo(listItem);

Supporting Material/References:

  • Linux Mint current
  • Node.js 8.11.1
  • NPM 6.4.0

Wrap up

  • I contacted the maintainer to let them know:N
  • I opened an issue in the related repository: N

Didn't do a patch myself because I'm not familiar with bitbucket and don't have account there, didn't contacted the maintainer for the same reason. It's obviously has a low level impact but I guess this is important due to the fact that this package is presented as a good place to start creating your own dashboards for atlasboard https://www.npmjs.com/package/atlasboard#importing-your-first-package May be it won't affect somebody directly, but as long as this package is created by well known company (Atlassian) it can be a bad example of how to not sanitize your inputs

Impact

Cross-site Scripting

Attachments

issue-summary.png
issue-summary.png From the original on HackerOne

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

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

Root cause

The widget uses jQuery's .append() to insert the issue summary as HTML instead of using .text() to treat it as plain text.

Impact

An attacker with the ability to create or modify JIRA issues could inject arbitrary HTML or JavaScript that executes in the dashboard, potentially leading to cross-site scripting.

What the attacker needed

Atlasboard installed; atlasboard-atlassian-package configured; JIRA server access; ability to create or modify JIRA issues

The fix

The widget should use .text() instead of .append() to insert the issue summary as plain text.

How it was found

  1. Install atlasboard globally and create a new dashboard.
  2. Add the atlasboard-atlassian-package as a submodule in the dashboard's packages directory.
  3. Configure the example dashboard to point to a JIRA server and set a JQL query.
  4. Create a JIRA ticket with a summary containing a script payload.
  5. Start the dashboard and visit the example dashboard URL, which will contain the payload.

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.

A dashboard widget puts JIRA issue text into the page without cleaning it. If an attacker controls that text, they can make the dashboard run their JavaScript.

What is XSS?

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

More by ermilov

View all

8 more disclosed reports, best first.

More from Node.js third-party modules

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.