Get list of members of any private groups from gitlab using merge request approval rules
A project maintainer could add any private group as an approver by changing the group ID in the request, and then the merge request participants list would reveal all members of that private group. This allowed disclosure of private group membership.
GitLab
Originally disclosed on GitLab
- Fixed in 5 months
- Disclosed after 5 months
HackerOne report #518995 by ashish_r_padelkar on 2019-03-30, assigned to jritchey:
Summary
Hello,
It is possible to get list of all the members from any private group for project maintainers/owners
Steps to reproduce
-
As a project owner/maintainer, go to
https://gitlab.com/<UserName>/<ProjectName>/edit#js-merge-request-approval-settings -
Now add any (your) group that you get in your dropdown of
Approvers -
Capture the request like below.
POST /<UserName>/<ProjectName> HTTP/1.1
Host: gitlab.com
Connection: close
Content-Length: 53
Accept: application/json, text/plain, */*
Origin: https://gitlab.com
X-CSRF-Token: 1
X-Requested-With: XMLHttpRequest
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36
Content-Type: application/x-www-form-urlencoded;charset=UTF-8
Referer: 1
Accept-Encoding: gzip, deflate
Accept-Language: en-GB,en-US;q=0.9,en;q=0.8
Cookie: 1
_method=PATCH&project%5Bapprover_group_ids%5D=3752673
-
As you can see, there is a
approver_group_idsparameter there. Just change this to any private group ID that you dont own (sequential ID) -
Save the settings with below configs.

-
Now create a merge request.
-
Look at the merge request
participantson right side. It will display all the members from the private group that you just added (plus your account)
Regards,
Ashish
What is the current bug behavior?
Possible to add any private/public group to the merge request approvals
What is the expected correct behavior?
Only eligible approvers should be allowed as mentioned here https://gitlab.com/help/user/project/merge_requests/merge_request_approvals
Relevant logs and/or screenshots
Shown in screenshots in reproductions steps
Output of checks
This bug happens on GitLab.com and might be on local installations too
Regards,
Ashish
Impact
Possible to find members of all the gitlab private groups
Attachments
Warning: Attachments received through HackerOne, please exercise caution!
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 application did not verify that the user had permission to add the specified group as an approver, allowing any group ID to be set.
Impact
An attacker could discover the members of any private group on GitLab.
What the attacker needed
A GitLab account; project owner or maintainer role
The fix
The application should restrict approver groups to only those the user is eligible to add, as per the documented merge request approvals rules.
How it was found
- As a project owner/maintainer, go to the project's merge request approval settings.
- Add a group from the approvers dropdown.
- Capture the request that saves the approval settings.
- Change the approver_group_ids parameter to a private group ID not owned by the user.
- Save the settings and create a merge request.
- View the merge request participants to see members of the private group.
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.
A private group on GitLab is a collection of users that only members can see. The bug let a project maintainer add any private group as an approver for merge requests, and then the system showed all members of that group in the merge request's participant list, leaking who belongs to the private group.
What is IDOR?
One user can read or change another user's data, usually by changing an identifier the server trusts without checking who is asking. One of the most paid bug classes on web programs.