Skip to content
Access control Disclosed report Beginner

Group Setting Package & Registry is Exposed to Low Privilege User

A low-privilege developer could change group-level package and registry settings via the GraphQL API, even though only the group owner should be able to do so. This allowed the developer to disable Maven duplicate package settings, potentially affecting all projects and subgroups under the group.

GitLab

Originally disclosed on GitLab

  • Fixed in 13 months
  • Disclosed after 13 months

HackerOne report #1103232 by vaib25vicky on 2021-02-14, assigned to @dcouture:

Report | Attachments | How To Reproduce

Report

Summary

Only OWNER of the group can access & edit package & registry setting.

pr1.png
pr1.png From the original on GitLab

BUT low privilege user such as Developer can also DISABLE package & registry by directly sending the request to the GraqphQL API mutation updateNamespacePackageSettings

curl --request POST \  
  --url https://gitlab.com/api/graphql \  
  --header 'Authorization: Bearer   <TOKEN>' \  
  --header 'Content-Type: application/json' \  
  --data '{"query":"\nmutation m1{\n  updateNamespacePackageSettings(input:{namespacePath:\"newtestgroup4\",mavenDuplicatesAllowed:false}){\n    errors\n  }\n}\n\n","operationName":"m1"}'

⚠️ Several reports where made with similar scenarios

When designing a solution, please make sure it will fix the following HackerOne reports

  1. #1104896
  2. #1265690
  3. #1278366
  4. #1423641
  5. #1423645
Steps to reproduce
  • Create a group and add a second user with developer permission
  • As developer run the mutation to DISABLE maven setting.

Replace newtestgroup4 with your group name and token with your personal access token


curl --request POST \  
  --url https://gitlab.com/api/graphql \  
  --header 'Authorization: Bearer   <TOKEN>' \  
  --header 'Content-Type: application/json' \  
  --data '{"query":"\nmutation m1{\n  updateNamespacePackageSettings(input:{namespacePath:\"newtestgroup4\",mavenDuplicatesAllowed:false}){\n    errors\n  }\n}\n\n","operationName":"m1"}'

Impact

Settings of group impact ALL projects & subgroups under that group. So if low privilege user DISABLE the maven repository then current packages in projects may be affected.

Attachments

Warning: Attachments received through HackerOne, please exercise caution!

How To Reproduce

Please add reproducibility information to this section:

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 GraphQL mutation `updateNamespacePackageSettings` did not properly check the user's role, allowing any user with developer access to modify group settings.

Impact

A low-privilege developer could disable Maven duplicate package settings for the entire group, potentially affecting all projects and subgroups under that group.

What the attacker needed

A GitLab group; a user with developer role in the group; a personal access token

How it was found

  1. Create a group and add a second user with developer permission
  2. As developer run the mutation to DISABLE maven setting.

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 many systems, different users have different permissions. A developer is a low-privilege user who should not be able to change group-wide settings. Here, the developer could send a special request to the API to change a setting that only the group owner should control, which could disrupt package management for everyone in the group.

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.