Skip to content
Access control Disclosed report Beginner

External users can create projects in groups they have access to

External users in GitLab are meant to be restricted and cannot create projects, but when added as a Developer to a group that allows Developers to create projects, they can still create new projects in that group's namespace. This lets an external user exceed the permissions the documentation says they should have.

GitLab

Originally disclosed on GitLab

  • Fixed in 20 months
  • Disclosed after 20 months

HackerOne report #669550 by xanbanx on 2019-08-08, assigned to jmatos_bgtvf:

Summary

GitLab has a feature of external users, which have restricted access to the application. In general, these users only have access to resources they are explicitly granted to. Furthermore, they cannot create projects. The documentation at https://docs.gitlab.com/ee/user/permissions.html#external-users-permissions states this in here:

They will, like usual users, receive a role in the project or group with all the abilities that are mentioned in the table above. They cannot however create groups or projects, and they have the same access as logged out users in all other cases.

However, this is not applied properly. If an external users is added as a developer member to a group, the external user can create new projects within that group, thus violating the capabilities of an external user.

Steps to reproduce

  1. As an administrator, create an external users
  2. As a group maintainer, add the newly created users to one group with Developer privileges. Note that the group must have enabled the setting Allowed to create projects: Developers + Maintainers
  3. Login as the external users. Within the group you can create a new project, thus violating the capabilities for an external user

Note, the external user can also create projects using different approaches, e.g., via forking to the group namespace.

Impact

External users can create projects in group namespaces, although that is not allowed according to the docs. Thus, external users are violating their capabilities.

What is the current bug behavior?

External users can create projects in group namespaces, although that is not allowed according to the docs.

What is the expected correct behavior?

External users should not be able to create projects.

Output of checks

This has been tested on a local installation of GitLab Enterprise 12.2.0-pre 40c9876dd80

System information  
System:         Ubuntu 18.04  
Proxy:          no  
Current User:   xanbanx  
Using RVM:      no  
Ruby Version:   2.6.3p62  
Gem Version:    3.0.3  
Bundler Version:1.17.2  
Rake Version:   12.3.2  
Redis Version:  4.0.9  
Git Version:    2.22.0  
Sidekiq Version:5.2.7  
Go Version:     go1.12.6 linux/amd64

GitLab information  
Version:        12.2.0-pre  
Revision:       40c9876dd80  
Directory:      /home/xanbanx/gdk/gdk-ee/gitlab  
DB Adapter:     PostgreSQL  
DB Version:     10.9  
URL:            http://localhost:3001  
HTTP Clone URL: http://localhost:3001/some-group/some-project.git  
SSH Clone URL:  ssh://xanbanx@localhost:2222/some-group/some-project.git  
Elasticsearch:  no  
Geo:            yes  
Geo node:       Undefined  
Using LDAP:     no  
Using Omniauth: yes  
Omniauth Providers: 

GitLab Shell  
Version:        9.3.0  
Repository storage paths:  
- default:      /home/xanbanx/gdk/gdk-ee/repositories  
GitLab Shell path:              /home/xanbanx/gdk/gdk-ee/gitlab-shell  
Git:            /usr/bin/git  

Impact

See above.

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 permission check for creating a project in a group only looks at the member role and the group setting, and does not also check whether the user is an external user.

Impact

An external user can create projects in a group namespace even though the documentation says they cannot, so the restricted account gains more capability than intended.

What the attacker needed

An external user account; group with Developers allowed to create projects; external user added as Developer

The fix

The expected behaviour is that external users should not be able to create projects, even when their role and the group setting would otherwise allow it.

How it was found

  1. As an administrator, create an external user.
  2. As a group maintainer, add that user to a group with Developer privileges, in a group where Developers and Maintainers are allowed to create projects.
  3. Log in as the external user and create a new project inside the group.

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.

GitLab has a special kind of account called an 'external user' that is supposed to be limited: it can only see things it is explicitly given, and it is not supposed to be able to make new projects. The report shows that if such an account is made a Developer in a group, it can still create projects there, which the documentation says should not happen.

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.