[Bugcrowd] JSM customers can get internal secrets via definitions
Description
This issue is similar to 0e670633-bdda-4cee-9ffe-a74f774d2a42, but it is likely not a duplicate since it is on another endpoint and it is related to different entities.
The app can be used in JSM, and there are some security settings related to what JSM users can or can not do. I found that regardless of the settings, JSM customers can get all approval definitions (including those not available for JSM customers). An approval definition allows to add Webhook steps. I assume that webhooks usually secured with some authentication. The app allows to configure HTTP headers that will be sent to the Webhook and I assume that they are supposed to be used for authentication in the webhook. Since JSM customers can see all definitions, they can get the header values.
Steps to reproduce:
Part 1. Configuration
-
Log in as admin, enable Jira Service Management if it is not enabled
-
On the left-side panel click
Apps->Approval Path -
Go to
Settings->Generaland enableAllow manual initiation of approvals -
Go to
Definitions -
Click
Create -
Set any name
-
Select the JSM project in
Space -
Enable
Available for JSM customersandCan be started by JSM customers -
Click
Add step-> and a Webhook step with filled headers parameter -
Click
Save definition
Part 2. The vulnerability
-
Go to
https://<INSTANCE>.atlassian.net/servicedeskin an incognito browser window and sign up -
Confirm email to complete sign up
-
Create any request and open it
-
Click on the eye button to view the definition
-
Go to requests history and find there a request to
https://app.approval-path.com/connect/jira/rest/definition/<ID>?jwt=.... Search for"steps"in the response, find the webhook step and you will see the header value. Also, if the definition is not available to JSM users, you can change the id in the url to the definition id and get it
QA pass done. It is no longer possible to see "requestUrlTemplate", "requestHeadersTemplate" and "requestBodyTemplate" values of webhook step when seeing definitions list, viewing the definition or seeing an approval as a non-admin user or JSM customer.
@Adam Lipiński I’ve decided to hide the details for all non admin users since they don’t have access to modify definitions, everything should work ok now.
The issue has been successfully reproduced by QA with provided steps.