ESCALATED: available_custom_project_templates does not check the access level of the user
The available_custom_project_templates method on the User model returned public projects even when the user's access level should have excluded them, because it did not check the user's permissions on each project. An attacker could therefore see projects that had repository, issue or snippet access disabled for guests.
GitLab
Originally disclosed on GitLab
- Fixed in 13 months
- Disclosed after 13 months
This is the 2nd vulnerability described at https://gitlab.com/gitlab-org/gitlab-ce/issues/67109
This is where the second vulnerability can be found. The
ProjectsFinderuses an initial collection, which consists of the projects the authenticated user can access. However, it does not check the access level of the user. This means that any project that is public, but has Repository, Issue, Snippets (etc.) access disabled for Guests, will be returned by theavailable_custom_project_templatesmethod on theUsermodel. In a perfect world, it seems that this method would limit the projects that can be returned based on the user's permissions for said projects.
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 ProjectsFinder was given an initial collection of projects the user can access but the available_custom_project_templates method did not filter that collection by the user's access level on each project.
Impact
A user could have public projects with repository, issue or snippet access disabled for guests returned by the method.
What the attacker needed
An authenticated account
The fix
The method should limit the returned projects based on the user's permissions for each project.
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.
A method listing template projects returned public projects whose repository, issue or snippet access was disabled for guests, because it did not check the user's access level.
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.