cross site scripting in Atlassian
A reflected cross-site scripting flaw existed in the partner search page of Atlassian's website, where the search term was inserted into the page without proper encoding. An attacker could craft a link that, when opened by a victim, would run script in the victim's browser and potentially steal their session cookie.
- Fixed in 2 months
- Disclosed after 5.7 years
Summary by Atlassian
Cross Site Scripting vulnerability in www.atlassian.com
Summary by Avanish
<s>My First Valid Report on Bugcrowd It was a XSS at the partner search section. Its has been fixed now .
Report details
-
Submitted
15 Nov 2017 18:05:12 UTC
-
Target Location
Any associated *.atlassian.com or *.atl-paas.net domain that can be exploited DIRECTLY from the *.atlassian.net instance -
Target category
Other
-
VRT
Cross-Site Scripting (XSS) > Stored > Non-Admin to Anyone
-
Priority
P3
-
Bug URL
https://www.atlassian.com/partners/search?name=%22%3E%3Cimg%2Bsrc%3Dx%2Bonerror%3Dprompt(document.cookie)%3B%3E%2B%60%60&page=1 -
Description
hello team, while going through atlassian bug bounty program I have come accross a xss vulnerability in your page which is very critical i would like to mention the steps below:- 1-open the target mentioned in the scope that is https://www.atlassian.com/software/confluence/team-calendars or atlassian.net 2-at the bottom of the page under Expand & learn group click on partners 3-on https://www.atlassian.com/partners click on the find partners 4-under search enter the payload mentioned below :- [ "><img src=x onerror=prompt(document.cookie);> `` ]
and press go or enter you'll see that the xss is taking place. which should not happen with this an attacker can send the link to any victim and hijack his session cookie and can gain control over users data or system via injected exploit. this needs to be fixed as soon as possible . which is very critical and has to be fixed
Attaching a POC video please refer.
Thanks Avanish
-
Extra info
Input which fails the validation should be rejected, not sanitized. Also User input should be HTML-encoded at any point where it is copied into application responses. All HTML meta characters, including < > " ' and =, should be replaced with the corresponding HTML entities (< > etc).
this is critical in this the attacker can send this link to any victim and steal the session cookie of the victim and can gain control over users data or system via injected exploit. this needs to be fixed as soon as possible
Context
Atlassian runs a public bug bounty programme on Bugcrowd, and this report is a stored cross-site scripting finding in the partner search section of www.atlassian.com. The asset in scope is described as:
Any associated *.atlassian.com or *.atl-paas.net domain that can be exploited DIRECTLY from the *.atlassian.net instance
The feature involved is the partner directory. From a product page such as the Confluence team calendars page, a visitor can follow a link at the bottom of the page, under the "Expand & learn" group, to the partners section, and from there use "find partners" to search the partner listings by name. The search term is placed back into the results page, and that is where the bug lives.
Atlassian's own summary calls it a cross-site scripting vulnerability in www.atlassian.com. The researcher's summary describes it as an XSS in the partner search section, and notes that it has since been fixed. The report was submitted on 15 Nov 2017 at 18:05:12 UTC, rated P3, classified under the VRT as Cross-Site Scripting (XSS) > Stored > Non-Admin to Anyone, and paid a bounty of 300.00 USD. It was disclosed on 2023-07-21.
Setup
No accounts, roles, tools or versions are described. The only precondition is reachability of the public partner search page on www.atlassian.com. The researcher worked from the browser, following the site's own navigation to reach the search form, and recorded a proof-of-concept video, which is referenced in the report but not included with the text.
Finding it
While going through the Atlassian bug bounty programme, the researcher came across an XSS vulnerability in the partner search page. The researcher reports that submitting a crafted name value in the search field causes the XSS to fire. The researcher describes the issue as critical and asks for it to be fixed as soon as possible.
Exploitation
Step 1: open the target
Start from the in-scope target, either the product page or the atlassian.net instance:
https://www.atlassian.com/software/confluence/team-calendars
Step 2: navigate to the partners section
At the bottom of the page, under the "Expand & learn" group, click on partners.
Step 3: open the partner finder
On https://www.atlassian.com/partners, click on "find partners".
Step 4: submit the payload in the search field
Under search, enter the following payload:
"><img src=x onerror=prompt(document.cookie);> ``
Then press go or enter. The payload injects an img element whose src is the non-existent x, and attaches an onerror handler that runs prompt(document.cookie). The trailing backticks are part of the submitted string. The researcher reports that the XSS fires at this point, which should not happen.
The same input is captured in the bug URL, where it is URL-encoded as the name parameter with page=1:
https://www.atlassian.com/partners/search?name=%22%3E%3Cimg%2Bsrc%3Dx%2Bonerror%3Dprompt(document.cookie)%3B%3E%2B%60%60&page=1
Decoded, the name value is "><img+src=x+onerror=prompt(document.cookie);>+```, with +` standing in for spaces. Because the payload sits in a URL, an attacker can hand the link to any victim rather than needing to type it into the form.
Root cause
The report does not describe the server-side code. What it shows is that the injected img element is parsed as part of the page and its onerror handler runs. The onerror handler then executes in the origin of www.atlassian.com.
The researcher's own remediation note states the principle: input which fails validation should be rejected, not sanitised, and user input should be HTML-encoded at any point where it is copied into application responses, with all HTML meta characters, including < > " ' and =, replaced with the corresponding HTML entities. The report does not say which of these defences was missing or why existing controls did not catch the payload.
Impact
The researcher states that an attacker can send the link to any victim and hijack the victim's session cookie, gaining control over the user's data or system via the injected exploit. The researcher states that an attacker can send the link to any victim and hijack the victim's session cookie. The report does not demonstrate cookie flags or a full account takeover; the proof of concept is the prompt(document.cookie) firing. The report is classified under the VRT as Cross-Site Scripting (XSS) > Stored > Non-Admin to Anyone.
Fix
The remediation the researcher recommends is to reject input that fails validation rather than sanitise it, and to HTML-encode user input wherever it is copied into responses, replacing all HTML meta characters, including < > " ' and =, with the corresponding HTML entities.
Variants to test
- Try the same breakout in other reflected parameters of the partner directory, such as pagination or filter values. A positive result is the injected element appearing in the response and its handler running.
- Try payloads that do not rely on
onerror, for example ansvgwith anonloadhandler, in case theimgpath is filtered. A positive result is script execution from the injected markup. - Try the payload with different quoting contexts, for example a single quote or no quote at all, to see which delimiter the value is placed inside. A positive result is a breakout with the matching delimiter.
- Try the same search feature on other
*.atlassian.comor*.atl-paas.nethosts reachable from an*.atlassian.netinstance, since the scope covers associated domains. A positive result is the same reflection and execution on the second host.
Hunting notes
Search and filter forms on marketing and directory pages are a common home for reflected XSS, because the query string is echoed back to build the results page and is easy to hand to a victim as a link. During recon, look for pages where a search term appears verbatim in the HTML source, especially inside attributes, and test the delimiters around it. The report shows the value of following the site's own navigation from a product page to the feature, which is how the partner search was reached. Impact was argued by pointing out that the crafted URL can be sent to any victim, which is what supports the session hijack claim in the submission.
What happened, in plain words
Atlassian is the company behind tools such as Confluence, Jira and Trello. It runs a public bug bounty programme on a platform called Bugcrowd: a bug bounty programme is an offer from a company that pays people who find security problems in its systems and report them privately instead of misusing them. A report is the write-up of one such finding.
This report is about a cross-site scripting bug, usually shortened to XSS, in the partner search section of www.atlassian.com. Cross-site scripting is a class of bug where a website takes something a visitor typed and puts it back into the page without neutralising it, so the visitor's own browser treats part of that text as instructions (code) rather than as plain text. The everyday comparison: imagine a noticeboard where visitors can pin notes, and someone pins a note that says "ignore the noticeboard, do what I say instead". If nobody checks the notes before pinning them, the board passes the instruction on to everyone who reads it.
The feature involved is the partner directory: a page where Atlassian lists companies it works with, and where you can search those listings by name. The search term is placed back into the results page, and that is where the bug lives. The researcher's summary says it was an XSS in the partner search section and that it has since been fixed.
The report was submitted on 15 Nov 2017 at 18:05:12 UTC. It was rated P3, which is a priority level on the programme's scale, classified under the VRT as Cross-Site Scripting (XSS) > Stored > Non-Admin to Anyone, and paid a bounty of 300.00 USD. VRT stands for Vulnerability Rating Taxonomy, a shared list of bug types and severities used to sort reports consistently. It was disclosed on 2023-07-21, meaning the report became public on that date.
Context
The asset in scope, meaning the part of Atlassian's systems the programme allows researchers to test, is described as:
Any associated *.atlassian.com or *.atl-paas.net domain that can be exploited DIRECTLY from the *.atlassian.net instance
Line by line: *.atlassian.com and *.atl-paas.net are wildcard patterns. The asterisk stands for any subdomain, so the sentence covers every Atlassian-owned site ending in those names. *.atlassian.net is the pattern for customer instances of Atlassian's cloud products, the addresses companies get when they sign up. The condition is that the problem must be reachable directly from such an instance, not only from somewhere unrelated.
Atlassian's own summary calls it a cross-site scripting vulnerability in www.atlassian.com. The researcher's summary describes it as an XSS in the partner search section and notes that it has been fixed.
The feature involved is the partner directory. From a product page such as the Confluence team calendars page, a visitor can follow a link at the bottom of the page, under the "Expand & learn" group, to the partners section, and from there use "find partners" to search the partner listings by name.
Setup
No accounts, roles, tools or versions are described. The only precondition is that the public partner search page on www.atlassian.com can be reached. The researcher worked from the browser, following the site's own navigation to reach the search form, and recorded a proof-of-concept video, which is referenced in the report but not included with the text. A proof of concept, or PoC, is a small demonstration that proves a bug is real, here a recording of the payload firing.
Finding it
While going through the Atlassian bug bounty programme, the researcher came across an XSS vulnerability in the partner search page. The researcher reports that submitting a crafted name value in the search field causes the XSS to fire. "Context" here means the surrounding HTML: the search term is dropped inside a piece of HTML, and if the characters around it are not handled carefully, the input can close that piece early and start a new one. "Markup" means HTML tags, the instructions that tell a browser what to display. The researcher describes the issue as critical and asks for it to be fixed as soon as possible.
Exploitation
Step 1: open the target
Start from the in-scope target, either the product page or the atlassian.net instance:
https://www.atlassian.com/software/confluence/team-calendars
This is an ordinary public web address for a Confluence product page. The researcher starts here because it is a normal entry point a real visitor would use, and because the scope requires the problem to be reachable from Atlassian's own sites. Following the site's own links, rather than guessing addresses, shows the bug is reachable the way a customer would reach it.
Step 2: navigate to the partners section
At the bottom of the page, under the "Expand & learn" group, click on partners. This is a normal navigation link in the page footer. The point of this step is to reach the partner directory through the site's own menu, so the path is realistic and repeatable.
Step 3: open the partner finder
On https://www.atlassian.com/partners, click on "find partners". This opens the search form for the partner listings. The researcher needs the form because the bug is in how the search term is handled.
Step 4: submit the payload in the search field
Under search, enter the following payload:
"><img src=x onerror=prompt(document.cookie);> ``
Then press go or enter. A payload is the crafted input that triggers the bug. Line by line, in plain words:
"and>close whatever HTML attribute or tag the search term was placed inside. Think of it as finishing someone else's sentence early so you can start your own.<img src=x ...>starts a new HTML element, an image, and tells the browser to load a picture from the addressx. No such picture exists, so the load will fail.onerror=prompt(document.cookie);attaches an error handler to that image. An error handler is a piece of JavaScript, the language browsers run, that the browser executes automatically when something goes wrong, here when the image fails to load.prompt(...)opens a small pop-up box showing whatever is inside the brackets.document.cookieis the browser's way of reading the cookies that belong to the current page. A cookie is a small piece of data a site stores in your browser, and it is often used to remember who you are after you log in. If a script can read it, it may be able to read a session cookie, which is the credential that keeps you logged in.- The trailing backticks are part of the submitted string.
The researcher reports that the XSS fires at this point, which should not happen.
The same input is captured in the bug URL, where it is URL-encoded as the name parameter with page=1:
https://www.atlassian.com/partners/search?name=%22%3E%3Cimg%2Bsrc%3Dx%2Bonerror%3Dprompt(document.cookie)%3B%3E%2B%60%60&page=1
Line by line: everything after the ? is the query string, the part of a URL that carries values to the page. name= is the parameter, the named slot holding the search term. page=1 is a second parameter asking for the first page of results. The %22, %3E, %3C and similar sequences are URL encoding: characters that are awkward or unsafe inside a URL are written as a percent sign plus a code, so %22 is ", %3E is >, %3C is <, and %60 is a backtick. The + signs stand in for spaces. Decoded, the name value is "><img+src=x+onerror=prompt(document.cookie);>+```, with +` standing in for spaces. Because the payload sits in a URL, an attacker can hand the link to any victim rather than needing them to type it into the form.
Root cause
The report does not describe the server-side code. What it shows is that the injected img element is parsed as part of the page and its onerror handler runs. HTML encoding means replacing characters that have a special meaning in HTML with safe stand-ins, so a browser displays them as text instead of acting on them. The onerror handler then executes in the origin of www.atlassian.com. An origin is the combination of scheme, host and port that a browser uses to decide which page is allowed to touch which data; script running in Atlassian's origin is treated as Atlassian's own script.
The researcher's own remediation note states the principle: input which fails validation should be rejected, not sanitised, and user input should be HTML-encoded at any point where it is copied into application responses, with all HTML meta characters, including < > " ' and =, replaced with the corresponding HTML entities. Validation means checking input against rules and refusing what does not fit; sanitising means cleaning input up so it becomes harmless. HTML entities are the written-out forms of special characters, such as < for <. The report does not say which of these defences was missing or why existing controls did not catch the payload.
Impact
The researcher states that an attacker can send the link to any victim and hijack the victim's session cookie, gaining control over the user's data or system via the injected exploit. Session hijacking means stealing the credential that proves you are logged in and using it to act as you. The researcher states that an attacker can send the link to any victim and hijack the victim's session cookie. The report does not demonstrate cookie flags or a full account takeover; the proof of concept is the prompt(document.cookie) firing. Cookie flags are settings on a cookie that restrict how it can be used, for example stopping scripts from reading it. The report is classified under the VRT as Cross-Site Scripting (XSS) > Stored > Non-Admin to Anyone.
Fix
The remediation the researcher recommends is to reject input that fails validation rather than sanitise it, and to HTML-encode user input wherever it is copied into responses, replacing all HTML meta characters, including < > " ' and =, with the corresponding HTML entities.
Variants to test
- Try the same breakout in other reflected parameters of the partner directory, such as pagination or filter values. A positive result is the injected element appearing in the response and its handler running.
- Try payloads that do not rely on
onerror, for example ansvgwith anonloadhandler, in case theimgpath is filtered. A positive result is script execution from the injected markup. - Try the payload with different quoting contexts, for example a single quote or no quote at all, to see which delimiter the value is placed inside. A positive result is a breakout with the matching delimiter.
- Try the same search feature on other
*.atlassian.comor*.atl-paas.nethosts reachable from an*.atlassian.netinstance, since the scope covers associated domains. A positive result is the same reflection and execution on the second host.
Hunting notes
Search and filter forms on marketing and directory pages are a common home for reflected XSS, because the query string is echoed back to build the results page and is easy to hand to a victim as a link. During recon, look for pages where a search term appears verbatim in the HTML source, especially inside attributes, and test the delimiters around it. Recon, short for reconnaissance, is the early stage of looking around a target to map what exists before testing anything. The report shows the value of following the site's own navigation from a product page to the feature, which is how the partner search was reached. Impact was argued by pointing out that the crafted URL can be sent to any victim, which is what supports the session hijack claim in the submission.
Glossary
- Bug bounty programme: a scheme where a company pays people who report security problems privately instead of exploiting them.
- Bugcrowd: the platform on which this programme runs and the report was submitted.
- Report: the written account of a security finding, including steps to reproduce it.
- Cross-site scripting (XSS): a bug where a site puts user input into a page without neutralising it, so the browser runs part of that input as code.
- Reflected input: input that a site echoes straight back into the page it returns, rather than storing it.
- Stored XSS: injected content that is saved and later shown to other users, as opposed to only being reflected once.
- Payload: the crafted input designed to trigger a bug.
- Markup / HTML: the tags that tell a browser what to display and how.
- Attribute: a setting written inside an HTML tag, such as the source of an image.
- Element / tag: a building block of an HTML page, such as an image or a link.
- JavaScript: the programming language browsers run to make pages interactive.
- Event handler: code attached to an element that runs when something happens to it, such as an image failing to load.
onerror: the handler that runs when an element, such as an image, fails to load.prompt(): a browser function that opens a small pop-up box showing text.- Cookie: a small piece of data a site stores in your browser, often used to remember who you are.
- Session cookie: the cookie that keeps you logged in; stealing it can let someone act as you.
- Session hijacking: stealing a logged-in user's credential and using it to take over their session.
- URL / query string: a web address; the part after
?carries named values to the page. - Parameter: a named slot in a query string, such as
nameorpage. - URL encoding: writing awkward characters in a URL as a percent sign plus a code, such as
%22for". - HTML encoding: replacing characters with special meaning in HTML with safe stand-ins so they display as text.
- HTML entity: the written-out form of a special character, such as
<for<. - Validation: checking input against rules and refusing what does not fit.
- Sanitising: cleaning input so it becomes harmless.
- Origin: the scheme, host and port combination a browser uses to decide which page may access which data.
- Scope: the parts of a company's systems a programme allows researchers to test.
- Wildcard (
*): a pattern standing for any subdomain in a scope description. - VRT: Vulnerability Rating Taxonomy, a shared list of bug types and severities.
- P3: a priority level on the programme's scale.
- Bounty: the money paid for a valid report.
- Disclosure: the date a report becomes public.
- Proof of concept (PoC): a small demonstration that proves a bug is real.
- Recon: the early stage of mapping a target before testing it.
- Delimiter: a character such as a quote that marks where a value starts and ends.
- Cookie flags: settings that restrict how a cookie can be used, for example stopping scripts from reading it.