Subgroup guest member can do all owner activities in the subgroup
A user demoted to guest in a subgroup could still perform owner-level actions there, such as adding owners, creating projects and creating further subgroups. This let a demoted attacker keep full control of the subgroup despite the role change.
GitLab
Originally disclosed on GitLab
- Fixed in 6.8 years
- Disclosed after 6.8 years
Title: Subgroup guest member can do all owner activities in the subgroup
Scope: *.gitlab.com
Weakness: Privilege Escalation
Severity: No Rating
Link: https://hackerone.com/reports/409363
Date: 2018-09-13 09:18:07 +0000
By: @ayid
Issue : Subgroup permissions not properly flown
There is a issue in subgroup permissions model where subgroup guest member can do all owner activities ( add owner, create another subgroup, create projects) in the subgroup
User A --> Attacker User B --> Victim Group A has a subgroup B
Group A | |____Subgroup B
Initial Configuration
Group A members : User A --> Owner User B --> Guest
Subgroup B members : User A --> Owner User B --> Owner
Victim Steps:
- Login as user B
- Change role of User A in subgroup B from "Owner" to "Guest"
Changed Configuration
Group A members : User A --> Owner User B --> Guest
Subgroup B members : User A --> Guest User B --> Owner
Attacker Steps:
- Login as User A
- Goto Subgroup B
- Though he is having guest role in the subgroup B, he is allowed to do all the owner role activities in the subgroup B such as add owner, add project, create subgroup, etc
Impact
Subgroup guest member can do all owner activities in the subgroup.
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 permission check for subgroup actions used the user's inherited role from the parent group rather than their explicit role in the subgroup itself.
What the attacker needed
Two accounts; attacker is owner in parent group; victim is owner in subgroup
How it was found
- Log in as the victim user who is an owner of the subgroup.
- Change the attacker's role in the subgroup from owner to guest.
- Log in as the attacker and open the subgroup.
- Perform owner-only actions such as adding an owner or creating a project despite the guest role.
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, groups can contain subgroups, and people have roles such as owner or guest. A guest should have limited rights, while an owner can manage everything. Here someone demoted to guest in the subgroup could still do owner actions there.
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.