Stored Xss on Portfolio
A stored cross-site scripting vulnerability existed in Jira Cloud's Portfolio feature, where a plan name field accepted malicious JavaScript. An attacker could inject script that executes when the plan is viewed, potentially stealing session data or performing actions as the victim.
Originally disclosed on Bugcrowd
- Accepted in 24 days
- Fixed in 2 months
- Disclosed after 3.8 years
Summary by Atlassian
Stored XSS on Portfolio in Jira Cloud
Summary by hackertabish786
3 years ago :v
Report details
-
Submitted
06 Apr 2017 18:55:48 UTC
-
Target Location
Jira Work Management Cloud formerly Jira Core (bugbounty-test-<bugcrowd-name>.atlassian.net) -
Target category
Web App
-
VRT
Cross-Site Scripting (XSS) > Stored > Non-Admin to Anyone
-
Priority
P3
-
Bug URL
https://bugbounty.atlassian.net/secure/PortfolioPlanManage.jspa -
Description
Hello,
My self Abdulwahab,
I am Writing this to You because i Found Stored Xss in Your Website.
PoC
1.Login 2.Go to Portfolio> Create New Plan 3.in Name Section add the Malicious Javascript Code i.e, "><script>alert(document.domain);</script> 4.Then Choose Filters any Filter 5.Then Next>Next>Next> Done 6.XSS BOOOOOM!
Watch Video PoC (Prv8 link)
Thanks, Abdulwahab, Independent Cyber Security Researcher,
Context
The target is Atlassian's Jira Cloud, specifically the asset listed as Jira Work Management Cloud formerly Jira Core (bugbounty-test-<bugcrowd-name>.atlassian.net). The vulnerable feature is Portfolio, reached through the plan management page at:
https://bugbounty.atlassian.net/secure/PortfolioPlanManage.jspa
Portfolio lets a user create plans and attach filters to them. A plan has a name, and that name is entered by the user during the creation flow. The report classifies the issue under the VRT entry Cross-Site Scripting (XSS) > Stored > Non-Admin to Anyone, with priority P3 and a bounty of 300.00 USD. It was disclosed on 2021-01-22, though the submission itself is dated 06 Apr 2017 18:55:48 UTC.
Setup
The only precondition shown in the report is being logged in. The researcher's first step is simply "Login", and the VRT classification (Non-Admin to Anyone) indicates the attacker does not need administrative rights. No specific account type, browser, tooling or product version is described.
Finding it
The report does not describe the discovery process. It opens with a short note that the issue was found three years before the write-up, and then goes straight into the proof of concept. What the researcher established is that the plan name field accepts a value containing a script tag and that this value is later rendered without being neutralised, so the script executes.
Exploitation
Step 1: Log in
Authenticate to the Jira Cloud instance. No credentials or session details are given.
Step 2: Open Portfolio and start a new plan
Navigate to Portfolio and choose Create New Plan. This is the flow that collects the plan name and its associated filters.
Step 3: Put the payload in the Name field
The Name section is filled with the following value:
"><script>alert(document.domain);</script>
The payload first closes an attribute with ">, which suggests the name is being written into an HTML attribute context, and then injects a script element. The script calls alert(document.domain), a harmless proof that reports the origin of the page executing the code.
Step 4: Choose a filter
Select any filter from the available list. The report does not say which filter or what the filter selection changes about rendering.
Step 5: Advance through the wizard
Click Next, Next, Next, then Done. The plan is created with the malicious name.
Step 6: The script fires
When the plan is rendered, the injected script executes. The researcher's summary of this step is "XSS BOOOOOM!".
A video proof of concept was recorded and linked in the report:
https://youtu.be/mBK5uniY-3g
Root cause
The report does not include any code or server response, so the exact defect is not shown. What the payload shape implies is that the plan name is stored and later inserted into an HTML attribute without encoding the quote character or the angle brackets, so a value that closes the attribute can introduce a new element. The likely failure is missing output encoding on the stored name at render time, rather than a missing input filter, since the value survives storage and executes on display.
Impact
The VRT entry places this as Stored XSS from a non-admin user to anyone, meaning the script persists in the plan and runs for other users who view it. The practical ceiling is whatever the viewing user's session allows in the Jira Cloud origin, but that is an inference from the classification, not something the report demonstrates.
Fix
The fix that follows from the root cause is to HTML-encode the plan name on output, in particular escaping quotes and angle brackets when the value is placed into an attribute, and to apply the same encoding wherever the stored name is rendered.
Variants to test
- Other name-like fields in the same product (plan names, filter names, saved search names) with the same
">prefix, checking whether an alert fires on the page that lists or opens the object. - Attribute contexts other than the one hit here, such as single-quoted attributes, using a payload that closes with
'instead of". - The same create-then-view pattern in other Atlassian Cloud products, watching for the stored value being reflected unencoded when the object is reopened.
A positive result is the script executing for a user who merely views the stored object, without any further interaction.
Hunting notes
This kind of bug tends to sit in multi-step creation wizards where a name is collected early and rendered later in a different view, which is exactly the Portfolio plan flow. The signal during recon is a feature that stores user-supplied labels and then displays them in list or detail pages. The researcher recorded a video proof of concept of the flow.
Timeline
| Event | Date |
|---|---|
| Submitted | 06 Apr 2017 18:55:48 UTC |
| Disclosed | 2021-01-22 |
The researcher's own summary of the gap is a single line: "3 years ago :v".
What happened, in plain words
A security researcher found a way to make a Jira Cloud page run code that he wrote, and to make that code run for other people too. The place he found it was a feature called Portfolio, where a user creates a "plan" and gives it a name. The name is saved by the server and shown again later. The problem was that the name was shown back without being cleaned up, so if the name contained a piece of JavaScript, the browser treated it as part of the page and ran it.
This kind of bug is called Stored Cross-Site Scripting, or Stored XSS. "Stored" means the harmful value is saved on the server and comes back later, rather than being bounced straight back to the person who typed it. "Cross-Site Scripting" means an attacker gets their own code to run inside a page that belongs to someone else's website, in the browser of whoever views that page.
To prove it, the researcher used a very small script that only shows a pop-up box with the address of the page. That is a harmless way of showing "my code ran here". He recorded a video of the whole flow. The report was disclosed on 2021-01-22. The submission itself is dated 06 Apr 2017 18:55:48 UTC, and the researcher's own note about the gap between the two is a single line: "3 years ago :v".
The target and the feature
The asset is listed as Jira Work Management Cloud formerly Jira Core (bugbounty-test-<bugcrowd-name>.atlassian.net). In plain terms, this is Atlassian's Jira Cloud, a web application teams use to track work items, and the specific test instance used for the bug bounty programme. The product name has changed over time, which is why the listing carries both the old and the new name.
The vulnerable feature is Portfolio, reached through this page:
https://bugbounty.atlassian.net/secure/PortfolioPlanManage.jspa
Reading that address from left to right: https:// is the secure web protocol, bugbounty.atlassian.net is the host, /secure/ is a path segment, and PortfolioPlanManage.jspa is the page that manages plans. The .jspa ending is simply how this application names some of its pages; you do not need to know anything about it to follow the report.
Portfolio lets a user create plans and attach filters to them. A plan has a name, and the user types that name during the creation flow. A filter, in Jira terms, is a saved search: a set of conditions that picks out a group of work items. Attaching a filter to a plan means the plan is built around whatever that saved search selects.
The report classifies the issue under the VRT entry Cross-Site Scripting (XSS) > Stored > Non-Admin to Anyone. VRT stands for Vulnerability Rating Taxonomy: a shared catalogue that programmes use to label the type of a bug consistently. The label tells you three things: the bug class is XSS, the variant is stored, and the attacker does not need to be an administrator, while the victims can be anyone. The priority is P3, and the bounty was 300.00 USD.
What you need before starting
The only precondition shown in the report is being logged in. The researcher's first step is simply "Login", and the VRT classification (Non-Admin to Anyone) indicates the attacker does not need administrative rights. No specific account type, browser, tooling or product version is described.
Being logged in matters because the plan belongs to an account. The server has to know who is creating it before it will save anything. A session, in everyday terms, is like a wristband you get at an event: you show your password once at the door, and afterwards the site recognises you by the wristband rather than asking again on every page.
Finding it
The report does not describe the discovery process. It opens with the short note about the three-year gap and then goes straight into the proof of concept. What the researcher established is that the plan name field accepts a value containing a script tag, and that this value is later rendered without being neutralised, so the script executes.
"Rendered" means turned into what you see on screen: the server sends text, and the browser builds the page from it. "Neutralised" means made safe, so that any characters with special meaning in a page are treated as ordinary text instead of instructions.
Exploitation, step by step
Step 1: Log in
Authenticate to the Jira Cloud instance. No credentials or session details are given. The reason for this step is simply that creating a plan is an action tied to your account, so you have to be signed in first.
Step 2: Open Portfolio and start a new plan
Navigate to Portfolio and choose Create New Plan. This is the flow that collects the plan name and its associated filters. The reason to use this particular flow is that it is the one place where a user-supplied name is captured and then displayed again later, which is exactly the pattern where a stored bug can live.
Step 3: Put the payload in the Name field
The Name section is filled with the following value:
"><script>alert(document.domain);</script>
Line by line, in plain words:
">is two characters: a double quote and a greater-than sign. In the page's underlying markup, a double quote often marks the end of an attribute value, and>often marks the end of a tag. Sending both is an attempt to break out of wherever the name is being placed and start writing new markup of your own.<script>opens a script element. Anything between the opening and closing script tags is treated by the browser as code to run, not as text to display.alert(document.domain);is the code itself.alertasks the browser to show a pop-up box with a message.document.domainis the address of the page that is running the code. So the pop-up displays the site's own address, which is a simple way of proving that the code ran in the context of that site.</script>closes the script element.
A payload is simply the value an attacker sends in the hope that it will be treated as code rather than as data. The reason for choosing this particular payload is that it is short, harmless and unmistakable: if a pop-up appears, the code ran.
Step 4: Choose a filter
Select any filter from the available list. The report does not say which filter, or what the filter selection changes about rendering.
Step 5: Advance through the wizard
Click Next, Next, Next, then Done. The plan is created with the malicious name. A wizard, in web terms, is a form split across several screens, where each Next saves what you entered and moves you on. Click Next, Next, Next, then Done.
Step 6: The script fires
When the plan is rendered, the injected script executes. The researcher's summary of this step is "XSS BOOOOOM!". In other words, the saved name comes back out of storage and into a page, and the browser follows the instructions hidden in it.
A video proof of concept was recorded and linked in the report:
https://youtu.be/mBK5uniY-3g
Why it works
The report does not include any code or server response, so the exact defect is not shown. What the payload shape implies is that the plan name is stored and later inserted into an HTML attribute without encoding the quote character or the angle brackets, so a value that closes the attribute can introduce a new element.
To unpack that: an HTML attribute is a setting written inside a tag, such as the address a link points to or the text shown in a box. Attribute values are usually wrapped in quotes. If the site pastes your name into such a value without escaping the quote character, then a quote you typed ends the value early, and whatever follows is read as new markup. That is why the payload starts with ">: it is designed to close the attribute and the tag, then open a fresh script element.
Encoding, also called escaping, is the defence: turning characters like ", < and > into harmless stand-ins so the browser displays them as text instead of interpreting them. The likely failure here is missing output encoding on the stored name at render time, rather than a missing input filter, since the value survives storage and executes on display.
Who is affected
The VRT entry places this as Stored XSS from a non-admin user to anyone, meaning the script persists in the plan and runs for other users who view it. That is the difference between stored and reflected XSS: a reflected bug only affects the person who clicks a crafted link, while a stored bug sits in the application and waits for visitors.
The practical ceiling is whatever the viewing user's session allows in the Jira Cloud origin, but that is an inference from the classification, not something the report demonstrates.
The fix
The fix that follows from the root cause is to HTML-encode the plan name on output, in particular escaping quotes and angle brackets when the value is placed into an attribute, and to apply the same encoding wherever the stored name is rendered.
A useful comparison is a mailroom that stamps every parcel "contents, not instructions". The parcel still arrives, and you can still read the label, but nobody treats what is written on it as an order to do something.
Other places to look
- Other name-like fields in the same product (plan names, filter names, saved search names) with the same
">prefix, checking whether an alert fires on the page that lists or opens the object. - Attribute contexts other than the one hit here, such as single-quoted attributes, using a payload that closes with
'instead of". - The same create-then-view pattern in other Atlassian Cloud products, watching for the stored value being reflected unencoded when the object is reopened.
A positive result is the script executing for a user who merely views the stored object, without any further interaction.
Why this pattern is common
This kind of bug tends to sit in multi-step creation wizards where a name is collected early and rendered later in a different view, which is exactly the Portfolio plan flow. The signal during recon is a feature that stores user-supplied labels and then displays them in list or detail pages. Recon here means the exploratory phase before attacking anything: looking around the application to see which features take input from you and show it back.
The researcher recorded a video proof of concept of the flow. Persistence means the value stays saved; execution means the browser actually runs it.
Timeline
| Event | Date |
|---|---|
| Submitted | 06 Apr 2017 18:55:48 UTC |
| Disclosed | 2021-01-22 |
The researcher's own summary of the gap is a single line: "3 years ago :v".
Glossary
- XSS (Cross-Site Scripting): a bug where an attacker's code runs inside another site's page in a victim's browser.
- Stored XSS: XSS where the harmful value is saved on the server and runs later for anyone who views it.
- Reflected XSS: XSS where the harmful value is bounced straight back in the same response, usually via a crafted link.
- Payload: the value an attacker sends, designed to be treated as code rather than as data.
- Script tag: the HTML element,
<script>, whose contents the browser runs as code. - alert: a browser function that shows a pop-up box with a message.
- document.domain: the address of the page currently running the code.
- HTML attribute: a setting written inside an HTML tag, usually with its value in quotes.
- Encoding (escaping): converting characters with special meaning into harmless stand-ins so they display as text.
- Rendering: the process of turning data into the page you see on screen.
- Neutralise: make a value safe so it cannot act as instructions.
- Session: the state that lets a site recognise you after you log in, without asking for your password on every page.
- VRT (Vulnerability Rating Taxonomy): a shared catalogue for labelling the type of a security bug.
- Priority (P3): the programme's urgency rating for the report.
- Bounty: the money a programme pays for a valid report.
- Wizard: a form split across several screens, with Next and Done buttons.
- Filter (in Jira): a saved search that picks out a group of work items.
- Plan (in Portfolio): an object a user creates, with a name and one or more attached filters.
- Recon: the exploratory phase of looking around an application to find where input is taken and shown back.
- Persistence: the property of a stored value staying saved on the server.
- Privilege escalation: gaining more permissions than you were given.
- Non-Admin to Anyone: a VRT label meaning the attacker needs no administrator rights and any user can be a victim.