User with custom role `Developer` base role `admin_compliance_framework` permission can change group URL via POST /{group_url}
A user with a custom role that includes the admin_compliance_framework permission could send a POST request to the group path and change the group's URL, despite the permission being intended only for managing compliance frameworks. This allowed an unauthorized user to modify group settings.
GitLab
Originally disclosed on GitLab
- Fixed in 49 days
- Disclosed after 49 days
⚠️ Please read the process on how to fix security issues before starting to work on the issue. Vulnerabilities must be fixed in a security mirror.
HackerOne report #2513934 by js_noob on 2024-05-21, assigned to @greg:
Report | Attachments | How To Reproduce
Report
Summary
Hello team, from the docs, users with admin_compliance_framework should only be able to create/update/delete the group's compliance framework.
Create, read, update, and delete compliance frameworks. Users with this permission can also assign a compliance framework label to a project, and set the default framework of a group.
However, users with that permission can update most of the group's permission, more specifically any change that is done by a POST request to /GROUP_PATH. The below POC is just an example of these changes.
Steps to reproduce
As an owner:
- Create a new group and apply the ultimate trial to it
- Create a new project in that group, and add a
.gitlab-ci.ymlfile with the following content
job:
script:
- echo "Hello"
- Navigate to https://gitlab.com/groups/GROUP/-/settings/roles_and_permissions, and create a new custom role having:
- base role:
Developer - extra role:
Admin compliance framework
- base role:

- Invite a developer to that group, and grant him that new role
As the developer:
- Verify that can't edit any of the group's settings
- Navigate to https://gitlab.com/groups/GROUP/-/security/compliance_dashboard/frameworks/new, fill out the necessary fields, and intercept the request
- Replace the request's URL with
/GROUP_PATH - Replace the request body + headers (except cookies) with the following, noting:
- Replace
CSRF_TOKENwithX-Csrf-Tokenheader of the previous (original) header - Replace
NEW_GROUP_PATHwith the path you want
- Replace
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:126.0) Gecko/20100101 Firefox/126.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate, br
Content-Type: multipart/form-data; boundary=---------------------------663860612978856746113686263
Content-Length: 630
Origin: https://gitlab.com
Upgrade-Insecure-Requests: 1
Sec-Fetch-Dest: document
Sec-Fetch-Mode: navigate
Sec-Fetch-Site: same-origin
Sec-Fetch-User: ?1
Priority: u=1
Te: trailers
-----------------------------663860612978856746113686263
Content-Disposition: form-data; name="_method"
patch
-----------------------------663860612978856746113686263
Content-Disposition: form-data; name="authenticity_token"
CSRF_TOKEN
-----------------------------663860612978856746113686263
Content-Disposition: form-data; name="group[parent_id]"
-----------------------------663860612978856746113686263
Content-Disposition: form-data; name="group[path]"
NEW_GROUP_PATH
-----------------------------663860612978856746113686263--
- Verify the success
Please refer to the video attached is you get stuck at any point.
Examples
What is the current bug behavior?
Users with admin_compliance_framework custom permission have access to POST /GROUP_PATH.
What is the expected correct behavior?
Users with admin_compliance_framework custom permission shouldn't be able access to POST /GROUP_PATH.
Output of checks
This bug happens on GitLab.com
Impact
Unauthorized users can change a group's settings.
Attachments
Warning: Attachments received through HackerOne, please exercise caution!
How To Reproduce
Please add reproducibility information to this section:
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 authorization check for the group update endpoint did not properly restrict users who only have the admin_compliance_framework permission, allowing them to perform any action that a POST to the group path permits.
Impact
An unauthorized user could change a group's settings, such as its URL.
What the attacker needed
GitLab.com account; Ultimate trial group; Custom role with admin_compliance_framework; Developer membership in the group
How it was found
- As an owner, create a new group and apply the ultimate trial.
- Create a project in the group with a .gitlab-ci.yml file.
- Create a custom role with base role Developer and extra permission Admin compliance framework.
- Invite a developer to the group and assign the custom role.
- As the developer, verify you cannot edit group settings.
- Navigate to the new compliance framework page, intercept the request, change the URL to /GROUP_PATH, and replace the body and headers with a crafted multipart request to change the group path.
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, custom roles let you give someone a specific extra permission on top of their base role. The admin_compliance_framework permission is meant only for managing compliance frameworks, but the system also let those users change the group's web address (URL). This is a problem because the permission should not allow changing group settings.
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.