Skip to content
IDOR Disclosed report Intermediate

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

  1. As a project owner/maintainer, go to https://gitlab.com/<UserName>/<ProjectName>/edit#js-merge-request-approval-settings

  2. Now add any (your) group that you get in your dropdown of Approvers

  3. 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  
  1. As you can see, there is a approver_group_ids parameter there. Just change this to any private group ID that you dont own (sequential ID)

  2. Save the settings with below configs.

Screenshot_2019-03-30_at_15.29.35.png
Screenshot_2019-03-30_at_15.29.35.png From the original on GitLab
  1. Now create a merge request.

  2. Look at the merge request participants on 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!

The original report as published on GitLab. Images and videos are our own copies; raw HTML is shown as text. View it on GitLab.

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

  1. As a project owner/maintainer, go to the project's merge request approval settings.
  2. Add a group from the approvers dropdown.
  3. Capture the request that saves the approval settings.
  4. Change the approver_group_ids parameter to a private group ID not owned by the user.
  5. Save the settings and create a merge request.
  6. 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.

More from GitLab

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Insecure direct object reference (IDOR)

The lesson behind this report.

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.