Skip to content
Access control Disclosed report Intermediate

Unauthorized User Can Promote Project Label to Group Label via API

A user with Reporter access to a single project in a group could promote a project label to a group label via the API, even though they only had Guest-like access to the group. This allowed them to modify group-level labels without proper authorisation.

GitLab

Originally disclosed on GitLab

  • Fixed in 2.2 years
  • Disclosed after 2.2 years

HackerOne report #695003 by rafiem on 2019-09-14, assigned to @jritchey:

Hi Team,

I notice that now i am using GitLab Edition 12.3.0-pre, then in the api documentation, i notice that a new endpoint is introduced in GitLab 12.3 : Promote a project label to a group label. Then i found a improper access control that allows any users that invited as "Reporter" level or higher to any of projects in group can promote a projects label to group labels. When a user is invited just for spesific project of group, the user is granted "Guest"-like access to the group. And this level should just have privelege of "Guest" user. In the permission documentation, it states that "Manage group labels" at least have privelege level as "Reporter". This issue is valid in both public and private groups. In the PoC, i will demonstrate just for private group.

Proof of Concept

1.) Let's say user A have a private group. In this case, i am using this group : https://gitlab.com/sukijan
2.) User A then invite User B as "Reporter" to the one of private group's project. In this case : https://gitlab.com/sukijan/yyyy
3.) User B then can view a list of labels in the projects label section
4.) Notice that there is no option to promote a label to the group labels. The option is just to make a new label, prioritize, edit, delete and subscribe/unsubscribe label.
5.) Using access token of User B, in API endpoint : https://gitlab.com/api/v4/projects/14306800/labels/promote, User B can make a PUT request by specifying the label name in the Body data to promote a project label to group label
6.) Promote access action success

<>PoC Video Attached

PoC.webm From the original on GitLab

Impact

User that only have access to spesific project in group is able to promote projects label to the group even if the user dont have access in the group (just "guest"-like access).

Best Regards,
@rafiem

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 API endpoint for promoting a project label to a group label checked only the user's role on the project, not their role on the group.

Impact

A user with only project-level access could promote a project label to a group label, affecting the group even though they lacked group-level permissions.

What the attacker needed

A GitLab account; Reporter access to a project in a group; API access token

How it was found

  1. User A creates a private group and invites User B as Reporter to one of its projects.
  2. User B views the project's labels and sees no option to promote a label.
  3. User B sends a PUT request to the promote endpoint using their access token, specifying the label name.
  4. The promotion succeeds.

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.

In GitLab, labels help organise issues. A project label belongs to one project, while a group label is shared across all projects in a group. The API let someone who only had access to one project change a group-wide label, which they should not be able to do.

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.