Skip to content
Access control Disclosed report Intermediate

Group members with Maintainer role can continue to have Maintainer role for projects they imported when thier permission changes

GitLab

Originally disclosed on GitLab

  • Fixed in 59 days
  • Disclosed after 59 days

HackerOne report #1451074 by s0l0sec on 2022-01-17, assigned to @nmalcolm:

Report | Attachments | How To Reproduce

Report

Summary

When group_member with Maintainer role imported a project, this user can continue to have Maintainers role after Owner downgrades this user to lower permissions.

Steps to reproduce

1.create user-A and User-B

2.as user-A create group(group-A)

3.as user-B create project (project-B) in your namespace and export it.

4.as user-A add user-B with Maintainer role in group-A.

5.as user-B import project-B in group-A

6.as user-A downgrade user-B to lower permission(Developer, reporter, guest, minimal)

7.check project-B member access you will see that user-B is still a Maintainer despite the fact that user-B is not a Maintainer at group level.

Impact

User-B can perform higher level actions like creating a protected branch and run a CI job that has access to protected variables from group-A

Attachments

Warning: Attachments received through HackerOne, please exercise caution!

How To Reproduce

The instructions from the researcher above are clear enough. Here are some screenshots of my reproduction, with "attacker" on the left and "victim" on the right.

In this screenshot, we see the "attacker" on the right has created two projects in a group where both the attacker and victim are a maintainer. One is a project the attacker created (attackermademanually), one is a project the attacker imported (doistillhavemaintaineraccess).

The "victim" then downgrades the "attacker" from Maintainer to Reporter. In this screenshot we see they are downgraded to Reporter on attackermademanually.

However on doistillhavemaintaineraccess, which the "attacker" imported (that's the important differentiator), they still have Maintainer access, even though the Group has set their Max Role to Reporter.

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.

What is known

A access control bug in gitlab.com. GitLab made it public on 21 March 2022.

About 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.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

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.