Privileges escalation to delete parent epic by unauthorized users
A guest user in a public group could remove the parent epic of an epic by using a quick action command, despite the UI not offering this option. This allowed an unauthorised user to escalate privileges and delete the parent epic.
GitLab
Originally disclosed on GitLab
- Fixed in 50 days
- Disclosed after 50 days
⚠️ Please read the process on how to fix security issues before starting to work on the issue. Vulnerabilities must be fixed in a security mirror.
HackerOne report #2792372 by mateuszek on 2024-10-18, assigned to @gandrews7:
Report | Attachments | How To Reproduce
Report
1. Description:
I found a scenario where unauthorized user (group guest) can delete the parent epic of the epic by the command - Privileges escalation to delete parent epic by unauthorized users
In general in relation to the Gitlab documentation related to epics:
https://docs.gitlab.com/ee/user/permissions.html#project-planning-group-permissions
Guests users CAN"T edit the epic - delete the parent epic of the epic - also in the UI there is no edit option in the area of parent epic of the epic - expected behaviour
Guests can only view epics, add issue to an epic and add/remove child epics (GUESTS CAN"T DELETE THE PARENT EPIC OF THE EPIC)
2. Scenario:
2.1. Actors:
User A - owner of the public group A
User B - guest of the public group A
2.2. Steps:
- User A - create the public epic A in the group A
- User A - create the public epic B in the group A
- User A - set the parent epic for epic A as epic B
- User B - go to the PoC epic A and notice that you don't see the edit option in the area of the parent epic - expected behaviour - you can't delete the parent epic for the epic A
- User B - in the PoC epic A in the comment section use the below command:
/remove_parent <URL_TO_THE_EPIC_B>
6. User B - notice that you deleted the parent epic (epic B) for the epic A without any problems - Privileges escalation to delete parent epic by unauthorized users
I recorded the PoC video where I show everything step by step - video1.mp4
Best regards,
Mateusz
Impact
- Privileges escalation to delete parent epic by unauthorized users
Attachments
Warning: Attachments received through HackerOne, please exercise caution!
How To Reproduce
Please add reproducibility information to this section:
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 quick action command for removing a parent epic did not enforce the same permission checks as the user interface.
What the attacker needed
Public group; guest user account; epic with a parent epic
How it was found
- User A creates a public epic A in group A.
- User A creates a public epic B in group A.
- User A sets epic B as the parent of epic A.
- User B (guest) visits epic A and sees no edit option for the parent epic.
- User B posts a comment on epic A containing the remove_parent quick action with the URL of epic B.
- User B observes that the parent epic (epic B) is removed from epic A.
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, epics can have a parent epic, and only users with certain permissions should be able to change that relationship. A guest user is supposed to have limited rights, but here they could use a special command in a comment to remove the parent epic, which they should not be allowed to do.
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.