Skip to content
Access control Disclosed report Beginner

User with custom role "Read code" permission has full access to the repository even if owner disabled the Repository and all its assets

GitLab

Originally disclosed on GitLab

  • Fixed in 2 months
  • Disclosed after 2 months

⚠️ 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 #2886976 by mateuszek on 2024-12-07, assigned to @ngeorge1:

Report | Attachments | How To Reproduce

Report

1. Description:
In general I found a scenario where user with custom role "Read code" permission has unauthorized full access to the repository and its assets when owner disabled the Repository and all its assets (e.g.: in that case owner doesn't see the repository and all its assets - expected behaviour for every member).

2. Scenario:

2.1. Actors:
User A - victim - owner of the public project A and owner of the public project A_PROJ (project inside group A)
User B - attacker - member of the public group A and public project A_PROJ with custom role: permissions Read code, Base role: Guest

2.2. Steps:

  1. User A - create a custom role in public group A:

Settings -> Roles and permissions -> New:
https://gitlab.com/groups/<group_A_name>/-/settings/roles_and_permissions
Base role: Guest
Custom permissions: Read code
2. User A - assign created custom role for User B:

https://gitlab.com/groups/<group_A_name>/-/group_members
3. User A - disable Repository and all its assets in the PoC public project A_PROJ:

Settings -> General -> Visibility, project features, permissions -> Repository - turn off this feature then save changes
4. User A - try to access to the Repository - you should see 404 Not Found - expected behaviour:

https://gitlab.com/<group_A_name>/<project_A_PROJ_name>/-/tree/main
5. User B - try to access to the Repository - notice that you have access to this module and all its assets without any problems :) - User with custom role "Read code" permission has full access to the repository even if owner disabled the Repository and all its assets

I recorded the PoC video where I show the PoC - video1.mp4

video1.mp4 From the original on GitLab

Best regards,
Mateusz

Impact

  • User with custom role "Read code" permission has full access to the repository even if owner disabled the Repository and all its assets

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.

What is known

A medium-severity access control bug in gitlab.com. GitLab made it public on 12 February 2025. Fixed in version 17.9.

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.