Skip to content
Access control Disclosed report Intermediate

Ability to Find Out Private Group's Membership by :group_id

The merge request approval endpoint allowed any user to add a private group as an approver without authorisation. After adding the private group, the merge request page revealed the group's membership, which should have been hidden.

GitLab

Originally disclosed on GitLab

  • Fixed in 3 months
  • Disclosed after 3 months

Adding ~HackerOne due a report we've received. In that use case, a user can add a private group and then view the list of members in the private group.

cc @jritchey WDYT of S3/P3 for group member enumeration?

Security issue (dev): https://dev.gitlab.org/gitlab/gitlab-ee/issues/362


Title:         Ability to Find Out Private Group's Membership by :group_id
Scope:         *.gitlab.com
Weakness:      None
Severity:      Low
Link:          https://hackerone.com/reports/421906
Date:          2018-10-10 03:32:00 +0000
By:            @ngalog

Details: Summary: Usually everything about private group is hidden, including who is in the group, however the approval endpoint allow unauthorised user to add any group, including private group to be the approver. After adding private group to be approver, the merge request page reveal the membership of that private group.

Steps To Reproduce:

  • Open a merge request in a project that you have at least maintainer access
  • In approver section, randomly select a group to be the approver, and set the number of approver to be 99
  • click submit merge request and use burp request to intercept the request
POST /golduserngalog/dfgsgfdg/merge_requests/11 HTTP/1.1
Host: gitlab.com
....

utf8=%E2%9C%93&_method=patch&authenticity_token=KW7qU6n6bQ1CX%2BnbRDNluvMxnwi%2F5VQnYRKT0tjMg%2BByZKoHqgFre5y2A2WJSDgOoTqA9ICRYxLyDtfBvN7VPQ%3D%3D&merge_request%5Btitle%5D=Add+new+file&merge_request%5Bdescription%5D=fdfd&merge_request%5Bassignee_id%5D=&merge_request%5Blabel_ids%5D%5B%5D=&merge_request%5Bapprover_ids%5D=&merge_request%5Bapprover_group_ids%5D=3711378&merge_request%5Bapprovals_before_merge%5D=99&merge_request%5Btarget_branch%5D=master&merge_request%5Bforce_remove_source_branch%5D=0&merge_request%5Bsquash%5D=0&merge_request%5Block_version%5D=

Change the merge_request%5Bapprover_group_ids%5D value to any private group id, in this case you can use 3711378, this is my private group, you can verify it is private by visiting https://gitlab.com/api/v4/groups/3711378

Then after the request, 302 will take you to the merge request page, and it will show the membership in approval status.

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 merge request update endpoint did not check that the user had permission to reference the private group in the approver_group_ids parameter, and the approval status display then exposed the group's members.

Impact

An attacker could learn the membership of any private group, which is normally hidden, by adding it as an approver to a merge request they control.

What the attacker needed

Maintainer access to a project; ability to intercept HTTP requests; knowledge of a private group ID

How it was found

  1. Open a merge request in a project where you have at least maintainer access.
  2. In the approver section, select a group as approver and set the number of approvers to 99.
  3. Submit the merge request and intercept the request with a proxy.
  4. Change the approver group ID parameter to the ID of a private group.
  5. Forward the request; the response redirects to the merge request page.
  6. Observe the membership of the private group shown in the approval status.

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 meant to keep its member list secret. The bug let anyone attach such a group to a merge request as an 'approver', and then the page showed who was in that group. This is an information leak: you learn who belongs to a private group without being a member.

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.

More from GitLab

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

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.