Skip to content
Access control Disclosed report Beginner

Unauthorized access to reading branch names when Repository and all its assets are disabled in the project

A developer could read branch names in a project where the Repository feature and all its assets were disabled. This allowed unauthorised access to branch names.

GitLab

Originally disclosed on GitLab

  • Fixed in 5 months
  • Disclosed after 5 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 #2862754 by mateuszek on 2024-11-24, assigned to @ottilia_westerlund:

Report | Attachments | How To Reproduce

Report

1. Description:
I found a scenario where attacker can read branch names when Repository and all its assets are disabled in the project - Unauthorized access to reading branch names when Repository and all its assets are disabled in the project.

2. Scenario:

2.1. Actors:
User A - owner of the public group A and owner of the public project A_PROJ (project inside group A)
User B - developer of the public group A and developer of the public project A_PROJ (project inside group A)

2.2. Steps:

  1. User A - in the PoC project A_PROJ go to: Secure -> On-demand scans and create the new scan by clicking New scan
  2. User A - in the PoC project A_PROJ go to: Settings -> General -> Visibility, project features, permissions -> Repository and turn off this feature and all its assets.
  3. User B - in the PoC project A_PROJ go to: Secure -> On-demand scans and notice that you see branch names without any problems - Unauthorized access to reading branch names when Repository and all its assets are disabled in the project - [screenshot1.png]
screenshot1.png
screenshot1.png From the original on GitLab

Best regards,
Mateuszz

Impact

  • Unauthorized access to reading branch names when Repository and all its assets are disabled in the project

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.

How it worked

Root cause

Likely the on-demand scans page did not check whether the Repository feature was enabled before displaying branch names.

What the attacker needed

Public project; attacker is a developer in the project; repository feature disabled

How it was found

  1. As User A, create a new on-demand scan in the project.
  2. As User A, disable the Repository feature and all its assets in the project settings.
  3. As User B, go to Secure -> On-demand scans and observe branch names.

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, a project can have features turned off, like the code repository, so users should not see any repository data. However, a developer could still see the names of branches through a different page. This is a problem because it leaks information that should be hidden.

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.