Improve text/docs around required permissions for system updates to alert status
A design flaw allowed users with the Reporter role to indirectly change the status of alerts to Resolved by closing incidents linked to those alerts, even though Reporters cannot view alerts. This violated the intended permission model where only Developers or higher should manage alert status.
GitLab
Originally disclosed on GitLab
- Fixed in 12 months
- Disclosed after 12 months
HackerOne report #1415785 by ashish_r_padelkar on 2021-12-02, assigned to @rshambhuni:
Report | How To Reproduce
Report
Summary
Hello,
Looks like there is a design flaw which allows Reporters to change alerts status which are not visible to reporters.
By design, alerts are only accessible to users with at-least Developers role . https://docs.gitlab.com/ee/operations/incident_management/alerts.html#alert-list
But the incidents created from this alerts are visible to all users. Problem with this is , when these incidents are closed, the alert status gets changed to Resolved too! - https://docs.gitlab.com/ee/operations/incident_management/alerts.html#create-an-incident-from-an-alert.
As Reporter users are allowed to close incidents, they are indirectly changing the alert status to Resolved which shouldn't happen as per permission model as reporter users cant even see the alerts!.
Note that, developers or higher user can manually change the status of alerts through alert page but using above flaw, even reporters users can change the alert status which should not happen!
Steps to reproduce
-
As a project admin, go to
https://gitlab.com/<NameSpace>/<ProjectName>/-/alert_managementand look for alert. -
Go to its detail page and create an incident for this alert.
-
Now login as Reporter user in this project and try to browse
https://gitlab.com/<NameSpace>/<ProjectName>/-/alert_managementbut you wont see this page as you dont have permission to view alerts. -
Now go to issues at
https://gitlab.com/<NameSpace>/<ProjectName>/-/issuesand look for issues withIncidentlabels. -
As a reporter user, you are allowed to close the incident. Close the incident( to identify incident associated with alert, In incident description page you will see the alert link ).
-
Login as project admin again and browse to
https://gitlab.com/<NameSpace>/<ProjectName>/-/alert_management. -
You will see alert is moved in
Resolvedtab.
What is the current bug behavior?
Reporters are allowed to change the alert status using the design flaw mentioned above!
What is the expected correct behavior?
As per documentation, only users with at-least developer roles should be allowed to change the status.
Output of checks
This bug happens on GitLab.com
Regards,
Ashish
Impact
Reporters can change alert status
How To Reproduce
Please add reproducibility information to this section:
Proposed Fix
- Update the documentation to reflect the current behavior; Reporters can update the status of alerts by closing an Incident (LOE: XS), https://gitlab.com/gitlab-org/gitlab/-/merge_requests/102426+
- Change the phrasing of the system note to reflect that
alert-bottook the action- example:
@alert-bot changed the status to Resolved, due to @syasonik closing incident #2483 (closed) just now(LOE: S)
- example:
- Add two new line items to the permissions table for editing/managing alerts and editing/managing incidents (LOE: XS), https://gitlab.com/gitlab-org/gitlab/-/merge_requests/102434+
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the system linked incident closure to alert status change without checking whether the user had permission to modify alerts.
Impact
Reporters could change the status of alerts to Resolved, which they should not be able to do according to the permission model.
What the attacker needed
A GitLab project with alerts enabled; a Reporter role in the project; an alert converted to an incident
The fix
The documentation was updated to reflect that Reporters can update alert status by closing an incident, and the permissions table was amended; a further change to the system note phrasing was proposed but not yet done.
How it was found
- As a project admin, go to the alert management page and find an alert.
- Open the alert's detail page and create an incident from it.
- Log in as a Reporter user and try to browse the alert management page; you will not see it due to lack of permission.
- Go to the issues list and find the incident (identified by its label or the alert link in its description).
- As the Reporter, close the incident.
- Log back in as project admin and check the alert management page; the alert is now in the Resolved tab.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
In GitLab, alerts are notifications about problems, and only users with certain roles (like Developer) are supposed to see and manage them. However, when an alert is turned into an 'incident' (a type of issue), any user who can close issues—including those with the lower Reporter role—could close the incident. Closing the incident automatically marked the original alert as 'Resolved', even though Reporters were never allowed to see or change alerts directly.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.