Get list of members of any private groups from gitlab using merge request approval rules
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) -
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!
