How I Found My First XSS Bug
Published on medium.com
Thedarkwayg
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Context
This is the story of a first cross-site scripting finding, made by a researcher who goes by @shadow_CLAY, on a private Bugcrowd program. The program is affiliated with Atlassian, and testing it required creating a Jira cloud account. The feature involved is the Atlassian signup flow, specifically the page where a new user picks a username after logging in with a Google account. That page takes several parameters in its URL, among them cloudId, requestId, redirecturl and isPermitted. The signup URL carries several parameters, among them cloudId, requestId, redirecturl and isPermitted.
The researcher's own framing of the target is loose: the summary says the invitation is for a program he refers to as redacted.com, and the final attack link he shows points at www.atlassian.com. The report does not describe the program's scope rules in any more detail than that.
Setup
- A private invitation to the Atlassian-affiliated program.
- A Jira cloud account, created as a precondition for testing.
- A Google account, used to log in during signup.
No specific tools, browser versions or proxy setup are mentioned. The whole discovery, by the researcher's own account, took about five minutes once he started looking for XSS.
Finding it
The entry point was the username creation page reached after logging in with Google.


The researcher's first instinct was open redirect, not XSS. He changed the domain name in the redirect parameter and added characters trying to get past the open redirect filter, and eventually got that bypass to work. He wrote it up and sent it to the Atlassian program.
Only afterwards did the XSS idea occur to him. He went back to the same page and put a JavaScript payload into the &redirecturl= parameter, set any username, and pressed Continue. The payload executed.

Exploitation
Step 1: confirm the payload fires
The parameter under test is redirecturl. The payload used was:
javascript:prompt(1)
With any username filled in and Continue pressed, the payload executed. That alone is a reflected XSS, but the researcher immediately hit a problem.
Step 2: understand the cloudId obstacle
The signup URL also carries a cloudId parameter, and that value is tied to an individual account. Because of this, the payload only executed for the researcher himself: the URL he was testing contained his own cloudId. Without the victim's cloudId, the finding would be self-XSS, which is not exploitable against anyone else.

This is the point where the report spends most of its reasoning. The XSS itself took minutes; the work was in turning it into something that could be delivered to another person.
Step 3: obtain the victim's cloudId
The researcher found two ways to get the parameter.
- Join the victim's Jira team. The attacker has to trick the victim into inviting him to the team, after which the attacker has access to the value.
1. The attacker needs to join the victim's Jira team. To do this, an attacker needs to trick the victim into inviting him to join his team.
- No account and no team membership at all. The attacker visits the victim's domain and views the page source. The
cloudIdvalue appears there.
2. An attacker does not need to log in to his account nor join the victim's team. An attacker just needs to visit the victim's domain and view the "Source page". The parameter "cloudId" will appear there.
The second route needs no account and no team membership: the attacker visits the victim's domain and views the page source, where the cloudId appears.
Step 4: build the delivery link
With the victim's cloudId in hand, the full link looks like this:
https://www.atlassian.com/signup?cloudId=(victim-id)&requestId=15178645&redirecturl=javascript:prompt(1)&isPermitted=false
In the report the link is written with a placeholder, (victim-id), where the stolen value goes. The other parameters, requestId and isPermitted=false, are carried along as they appear in the flow. The researcher also shows a variant of the same URL, in which the payload reads the cookie:
https://www.atlassian.com/signup/rename/site?cloudId=de003439-d8dd-4ea7-8477-fb0519e3991a&requestId=15178645&redirecturl=javascript:prompt(document.cookie%29&isPermitted=false
Note the closing parenthesis encoded as %29 inside the redirecturl value, and that this second URL uses the /signup/rename/site path. The cloudId in it is a concrete UUID; treat it as an example value belonging to an account, not something to reuse.
The attack sequence is then: the victim opens the crafted link, sets a username, presses Continue, and the script in redirecturl executes in the victim's session.
Root cause
The signup page accepts a javascript: URI in the redirecturl parameter and executes it after the username step. A javascript: URI is therefore accepted and executed when the flow moves the user onward after the username step. The cloudId parameter does not protect the page; it only scopes the URL to one account, which is why the researcher first saw the behaviour as self-XSS. The report does not show the server-side or client-side code, so the exact place where the value is written into the page or passed to a navigation call is not stated; that part is likely a missing allow-list of schemes or hosts on redirecturl.
Impact
An attacker who knows a victim's cloudId can send a link that runs arbitrary JavaScript in the victim's session on the Atlassian signup page, after the victim completes the username step. The researcher also shows a variant of the URL whose payload is javascript:prompt(document.cookie). The precondition is the cloudId, which the report says can be read from the source of the victim's domain without any authentication, or obtained by being invited into the victim's Jira team. Without that value the bug is self-XSS only.
Atlassian accepted the report as a reflected XSS and rated it P3.
Fix
Based on the behaviour, the redirecturl parameter should only accept relative paths or URLs on an allow-list of trusted hosts, and any scheme other than http and https should be rejected before the value is used for navigation.
Variants to test
- Other parameters that feed a post-signup redirect, such as return URLs on login, logout, invitation acceptance and SSO callback pages. A positive result is a
javascript:ordata:value that executes after the form is submitted. - The same
redirecturlparameter with scheme variations: mixed case (JaVaScRiPt:), leading whitespace or control characters, and HTML entity encoding. A positive result is execution where the plain payload was filtered. - Account-scoped identifiers like
cloudIdon other multi-tenant products. Check whether the identifier appears in the HTML source of a tenant's public pages; if it does, a self-XSS gated on that identifier becomes remotely deliverable. - Redirect parameters that were already found vulnerable to open redirect. Re-test them with
javascript:payloads, since a filter written for domains may not consider schemes at all.
Closing note
The researcher's own advice is to keep going after the first bug: the open redirect was the finding he reported first, and the XSS came from returning to the same parameter with a different idea. The lesson he draws is to chain what you find rather than stopping at the first result.
What happened, in plain words
A security researcher who goes by @shadow_CLAY received a private invitation to test a bug bounty program on Bugcrowd. The program is connected to Atlassian, the company behind Jira, and to test it he first had to create a Jira cloud account. While going through the signup flow, he found a cross-site scripting (XSS) bug: a way to make the signup page run JavaScript code that he supplied through the address of the page. He first reported a different bug (an open redirect), then came back to the same page with a new idea and found the XSS. The tricky part was that the page also carried an identifier tied to one specific account, so at first the script only ran for him. He found two ways to get that identifier for another person, which turned a harmless self-XSS into something he could send to a victim. Atlassian accepted the report as a reflected XSS, rated it P3, and the recorded bounty was 600.00 USD. The write-up was published on 25 November 2021.
Context
This is the story of a first XSS finding, made on a private Bugcrowd program. The program is affiliated with Atlassian, and testing it required creating a Jira cloud account.
A few words before we start, because the rest of the article uses them constantly:
- Bug bounty program: a company invites independent researchers to look for security problems in its systems and pays for good reports. A private program means only invited people can take part.
- Jira: Atlassian's tool for tracking tasks and projects. A Jira cloud account is simply an account on Atlassian's hosted version of it.
- Signup flow: the series of pages you go through to create an account. Here it is the Atlassian signup, and in particular the page where a new user picks a username after logging in with a Google account.
- Parameter: a named value attached to the end of a web address, after a
?, in the formname=value. Parameters let one page behave differently depending on the link that led to it. Think of them as the options you tick on an order form: same form, different result.
The signup page takes several parameters in its URL, among them cloudId, requestId, redirecturl and isPermitted.
The researcher's own framing of the target is loose: the summary says the invitation is for a program he refers to as redacted.com, and the final attack link he shows points at www.atlassian.com. The report does not describe the program's scope rules in any more detail than that.
Setup
- A private invitation to the Atlassian-affiliated program.
- A Jira cloud account, created as a precondition for testing.
- A Google account, used to log in during signup.
No specific tools, browser versions or proxy setup are mentioned. The whole discovery, by the researcher's own account, took about five minutes once he started looking for XSS.
Finding it
The entry point was the username creation page reached after logging in with Google.

The first image shows the private invitation to the program, which the researcher refers to as redacted.com.

The second image shows the username creation page that appears after logging into the Google account.
His first instinct was not XSS but open redirect. An open redirect is a bug where a site takes a destination from the URL and sends you there without checking it, so an attacker can craft a link on the real site that quietly forwards you to a site of their choosing. It is often used to make phishing links look trustworthy. To test for it, he changed the domain name in the redirect parameter and added characters trying to get past the open redirect filter, and eventually got that bypass to work. He wrote it up and sent it to the Atlassian program.
Only afterwards did the XSS idea occur to him. XSS (cross-site scripting) means getting a site to run JavaScript that an attacker supplied, inside a victim's browser, in the context of that site. The everyday comparison: imagine a noticeboard where visitors can pin notes, and the board's owner reads every note aloud as if it were an official announcement. If you can pin a note that says "hand over your keys", it gets read out with the owner's authority. In a browser, that means the attacker's code can read what the page can read and do what the page can do.
He went back to the same page and put a JavaScript payload into the &redirecturl= parameter, set any username, and pressed Continue. The payload executed.

The third image shows the result: the payload in the redirecturl parameter fires and the XSS executes.
Exploitation
Step 1: confirm the payload fires
The parameter under test is redirecturl. The payload used was:
javascript:prompt(1)
Line by line, in plain words:
javascript:is a URI scheme, the part before the colon in a link that tells the browser what kind of address follows. You already knowhttp:andhttps:for web pages andmailto:for email.javascript:tells the browser that what follows is code to run, not a place to go.prompt(1)is a built-in browser function that opens a small dialog box showing the value1and asking for input. Researchers use it as a harmless, visible proof: if the box appears, code ran.
With any username filled in and Continue pressed, the payload executed. "Page context" means the code runs as if it were part of the Atlassian page itself, with the same access to that page's data. That alone is a reflected XSS: the payload travels in the link, is reflected back by the page, and runs. But the researcher immediately hit a problem.
Step 2: understand the cloudId obstacle
The signup URL also carries a cloudId parameter, and that value is tied to an individual account. A cloud ID here is an identifier for one specific Atlassian cloud site, a long string that names that account's instance. Think of it as a locker number: it tells the system which locker to open, and each person has their own.
Because of this, the payload only executed for the researcher himself: the URL he was testing contained his own cloudId. Without the victim's cloudId, the finding would be self-XSS, which is not exploitable against anyone else. Self-XSS means the only person who can trigger the bug is the person who types the payload in, which is no more dangerous than typing code into your own browser console.

The fourth image illustrates this: the XSS only runs for the researcher individually, because the ?cloudId= parameter is created specifically for him.
This is the point where the report spends most of its reasoning. The XSS itself took minutes; the work was in turning it into something that could be delivered to another person.
Step 3: obtain the victim's cloudId
The researcher found two ways to get the parameter.
- Join the victim's Jira team. The attacker has to trick the victim into inviting him to the team, after which the attacker has access to the value.
1. The attacker needs to join the victim's Jira team. To do this, an attacker needs to trick the victim into inviting him to join his team.
In plain words: this route relies on social engineering, persuading the victim to add the attacker to their team. Once inside, the attacker can see the value. It works, but it needs the victim to cooperate.
- No account and no team membership at all. The attacker visits the victim's domain and views the page source. The
cloudIdvalue appears there.
2. An attacker does not need to log in to his account nor join the victim's team. An attacker just needs to visit the victim's domain and view the "Source page". The parameter "cloudId" will appear there.
In plain words: "view source" is the browser feature that shows the raw HTML a page is built from, the same text the server sent. If the identifier is written into that HTML, anyone who can open the page can read it, with no login and no invitation.
The second route needs no account and no team membership: the attacker visits the victim's domain and views the page source, where the cloudId appears.
Step 4: build the delivery link
With the victim's cloudId in hand, the full link looks like this:
https://www.atlassian.com/signup?cloudId=(victim-id)&requestId=15178645&redirecturl=javascript:prompt(1)&isPermitted=false
Line by line, in plain words:
https://www.atlassian.com/signupis the signup page on Atlassian's site.?starts the list of parameters.cloudId=(victim-id)is where the stolen identifier goes. In the report the link is written with a placeholder,(victim-id), because the real value belongs to a real account.&requestId=15178645is another parameter, carried along as it appears in the flow.&separates one parameter from the next.redirecturl=javascript:prompt(1)is the payload: the destination the page will try to send the user to after the username step.isPermitted=falseis a further parameter, again carried along as it appears in the flow.
The researcher also shows a variant of the same URL, in which the payload reads the cookie:
https://www.atlassian.com/signup/rename/site?cloudId=de003439-d8dd-4ea7-8477-fb0519e3991a&requestId=15178645&redirecturl=javascript:prompt(document.cookie%29&isPermitted=false
Line by line, in plain words:
- The path is now
/signup/rename/siterather than/signup. - The
cloudIdhere is a concrete UUID, a long identifier in the standard8-4-4-4-12character pattern. Treat it as an example value belonging to an account, not something to reuse. redirecturl=javascript:prompt(document.cookie%29is the payload again, but this time it asks fordocument.cookie. A cookie is a small piece of data a site stores in your browser and sends back with each request, commonly used to remember who you are.document.cookieis how JavaScript reads the cookies the page is allowed to see, so printing it proves the attacker's code can reach session data.%29is the closing parenthesis)written in percent-encoding, the way special characters are escaped inside a URL so they do not break its structure.%29and)mean the same thing to the browser.
The attack sequence is then: the victim opens the crafted link, sets a username, presses Continue, and the script in redirecturl executes in the victim's session.
Root cause
The signup page accepts a javascript: URI in the redirecturl parameter and executes it after the username step. A javascript: URI is therefore accepted and executed when the flow moves the user onward after the username step. The cloudId parameter does not protect the page; it only scopes the URL to one account, which is why the researcher first saw the behaviour as self-XSS. The report does not show the server-side or client-side code, so the exact place where the value is written into the page or passed to a navigation call is not stated; that part is likely a missing allow-list of schemes or hosts on redirecturl.
An allow-list is the opposite of a blocklist: instead of listing what is forbidden, you list exactly what is permitted and reject everything else. For a redirect, that would mean accepting only http and https links to known hosts.
Impact
An attacker who knows a victim's cloudId can send a link that runs arbitrary JavaScript in the victim's session on the Atlassian signup page, after the victim completes the username step. The researcher also shows a variant of the URL whose payload is javascript:prompt(document.cookie). The precondition is the cloudId, which the report says can be read from the source of the victim's domain without any authentication, or obtained by being invited into the victim's Jira team. Without that value the bug is self-XSS only.
Atlassian accepted the report as a reflected XSS and rated it P3. A P3 is a priority rating on a scale where P1 is the most severe and P5 the least; P3 is a middle, moderate rating.
The sixth image shows the report being accepted and rated P3.
Fix
Based on the behaviour, the redirecturl parameter should only accept relative paths or URLs on an allow-list of trusted hosts, and any scheme other than http and https should be rejected before the value is used for navigation.
Variants to test
- Other parameters that feed a post-signup redirect, such as return URLs on login, logout, invitation acceptance and SSO callback pages. A positive result is a
javascript:ordata:value that executes after the form is submitted. - The same
redirecturlparameter with scheme variations: mixed case (JaVaScRiPt:), leading whitespace or control characters, and HTML entity encoding. A positive result is execution where the plain payload was filtered. - Account-scoped identifiers like
cloudIdon other multi-tenant products. Check whether the identifier appears in the HTML source of a tenant's public pages; if it does, a self-XSS gated on that identifier becomes remotely deliverable. - Redirect parameters that were already found vulnerable to open redirect. Re-test them with
javascript:payloads, since a filter written for domains may not consider schemes at all.
Closing note
The researcher's own advice is to keep going after the first bug: the open redirect was the finding he reported first, and the XSS came from returning to the same parameter with a different idea. The lesson he draws is to chain what you find rather than stopping at the first result.
Glossary
- Bug bounty program: a company's scheme that pays independent researchers for reporting security problems; a private program is invitation-only.
- Jira: Atlassian's tool for tracking tasks and projects; a Jira cloud account is an account on its hosted version.
- Signup flow: the sequence of pages used to create an account.
- Parameter: a named value in a URL after
?, writtenname=value, that changes how the page behaves. - Open redirect: a bug where a site sends you to a destination taken from the URL without checking it, so a link on the real site can forward you elsewhere.
- XSS (cross-site scripting): getting a site to run attacker-supplied JavaScript in a victim's browser, in the context of that site.
- Reflected XSS: XSS where the payload travels in the request (usually the link) and is echoed back by the page, then runs.
- Self-XSS: a bug that only the person who enters the payload can trigger, so it cannot be used against anyone else.
- Payload: the piece of code or input an attacker supplies to trigger a bug.
- URI scheme: the part before the colon in an address, such as
http:,https:,mailto:orjavascript:, telling the browser what kind of address it is. - Page context: the environment in which code runs as if it were part of the page itself, with the same access to that page's data.
- cloudId: an identifier for one specific Atlassian cloud site, tied to a single account.
- UUID: a long identifier in the standard
8-4-4-4-12character pattern. - View source: the browser feature that shows the raw HTML a page is built from.
- Cookie: a small piece of data a site stores in your browser and sends back with each request, commonly used to remember who you are.
- document.cookie: the JavaScript way to read the cookies the page is allowed to see.
- Percent-encoding: the way special characters are escaped inside a URL, for example
%29for). - Allow-list: a list of exactly what is permitted, with everything else rejected.
- P3: a priority rating on a scale from P1 (most severe) to P5 (least); P3 is moderate.
- SSO callback page: a page in a single sign-on flow that receives the user back from the identity provider.
- Multi-tenant product: a service where many separate customer accounts share the same platform, each with its own identifier.