Skip to content
Access control Disclosed report Intermediate

Weird behaviour of the Gitlab cloud system lets to "takeover" the public and private groups

A user could create a group whose name ends in '.html' and the system would link it to an existing group with the same name without the suffix, letting the attacker see and import the victim's group and projects. The attacker could not become a member but could use the direct transfer import feature to copy the victim's group.

GitLab

Originally disclosed on GitLab

  • Fixed in 4 months
  • Disclosed after 4 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 #3067341 by mateuszek on 2025-03-30, assigned to GitLab Team:

Report | How To Reproduce

Report

1. Description:
I found a weird behaviour of the Gitlab cloud system lets to "takeover" the public and private groups.
For example if there exists a group created by User B with name: mateuszek_poc_takeover
Then when User A will create a group named: mateuszek_poc_takeover.html THEN the Gitlab system will link the existing User B group with User A - User A will see the group created by User B in his groups AND when User A will enter to the created group (mateuszek_poc_takeover.html) then the system will redirect him to group of User B - BUT User A will not be a member of this group BUT User A can use the Import groups by direct transfer AND there will be visible for User A the group created by User B and User A can import it with its projects successfully! Maybe it is a bit complicated but something is there really not good :D

2. Scenario:

2.1. Actors:
User A - attacker - Gitlab cloud user
User B - victim - Gitlab cloud user

2.2. Steps:

  1. User B - create a public group in Gitlab cloud e.g.: named: mateuszek_poc_blablabla_public
  2. User B - create a private group in Gitlab cloud e.g.: named: mateuszek_poc_blablabla_private
  3. User B - add some group avatars to the created groups - for better understand the PoC
  4. User A - create a public group in Gitlab cloud named: mateuszek_poc_blablabla_public.html
  5. User A - create a private group in Gitlab cloud named: mateuszek_poc_blablabla_private.html
  6. User A - go to your profile -> Groups and notice that there are created groups by you in the previous steps BUT HERE WE ARE - try to enter for example to mateuszek_poc_blablabla_public.html AND notice that the system will redirect you to the group created by User B!!!! So at this point - we have in our created Groups the groups created by User B!!!
  7. User A - now, we will use the feature: Import groups by direct transfer - go to creating the new group feature then choose Import group THEN under: Import groups by direct transfer

Type:
GitLab source instance base URL: https://gitlab.com
Personal access token: <USER A PAT TOKEN WITH api scope>
Then click Connect instance

NOW, notice that in the next window: Import groups by direct transfer you can find the groups: mateuszek_poc_blablabla_public.html and mateuszek_poc_blablabla_private.html THAT ARE POINTING TO User B group, NOW notice that you can use Import feature of this groups without any problems and the system will return successful response!

I am still analyzing this weird behaviour of the Gitlab cloud system BUT something is really not good there.

Best regards,
Mateusz

Impact

  • Weird behaviour of the Gitlab cloud system lets to "takeover" the public and private groups

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 group name or path is normalised by stripping a '.html' suffix before a uniqueness or lookup check, so two different names resolve to the same group.

Impact

An attacker could view and import a victim's public and private groups and their projects without being a member, though the text does not show full control over the group.

What the attacker needed

A GitLab.com account; a personal access token with api scope; victim has a group with a matching name

How it was found

  1. Victim creates a public group and a private group.
  2. Attacker creates groups with the same names plus '.html'.
  3. Attacker visits their groups page and enters the '.html' group, which redirects to the victim's group.
  4. Attacker uses 'Import groups by direct transfer' with their own token and sees the victim's groups listed.
  5. Attacker imports the victim's groups successfully.

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.

On GitLab, groups have names that must be unique. The report says that if you add '.html' to the end of a name, the system treats it as the same group as one without that ending. This let one user see and copy another user's group, even a private one, without being a member.

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.