Skip to content
Access control Disclosed report Beginner

Access to Locked files of Restricted Repository Project(Information Disclosure)

A project's repository was restricted to project members only, but the path locks endpoint remained reachable by any logged-in user. An attacker could view locked file paths, branch names and user details that the permission setting was meant to hide.

GitLab

Originally disclosed on GitLab

  • Fixed in 2 months
  • Disclosed after 2 months

HackerOne report #439714 by vijay_kumar1110 on 2018-11-13:

##Summary & Description : In the Project -- > settings -- > general -- > permissions you can restrict Access of repository "Only project member " . Once you make these changes then no other user should be able to access your project repository or any related details. But Locked Files section in the Repository is Still Accessible for any user which also discloses information about Files,Branches,Users etc. In the reproduction i have restricted almost all other sections too and disabled the public pipelines Also.

##Vulnerable API request : https://gitlab.com/[Username]/[project_name]/path_locks

Steps To Reproduce:

Take 2 different accounts to reproduce this issue.

  1. Login from Victim account and create a project.
  2. Keep the Project as internal/Public and set Only project members permission for Repository.
  3. I would recommend you to restrict all other sections and make the Public pipeline Disabled as permissions doesn't mix up.
  4. Now only member should be able to access repository and no other user should be able to access any details of repository.
  5. Now login from attacker account and go to the project.
  6. Now you will notice that this user doesn't have access to repository section of the project and if you have disabled other section , he might not be able to access other sections too.

That means this user shouldn't be able to access any repository details of this project. 6. Now Run above mentioned API request with valid project_name . 7. You will notice that particular page is still publicly accessible.

Supporting Material/References:

Let me know if you require one.

Impact

Access to Locked files of Restricted Repository Project(Information Disclosure)

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 path locks endpoint lacked the same authorisation check applied to the rest of the restricted repository.

What the attacker needed

Two accounts; victim project with member-only repository; attacker has a valid account

How it was found

  1. Log in as the victim and create a project.
  2. Set the project to internal or public and restrict the repository to project members only.
  3. Optionally restrict other sections and disable public pipelines.
  4. Log in as the attacker and open the project, confirming the repository is not accessible.
  5. Request the project's path locks endpoint with the valid project name.
  6. Observe that the locked files page is still publicly accessible.

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 project owner can set a repository so only team members may see it. The page listing locked files did not check that setting, so any other user could still open it and read file and branch names. This is an information disclosure: private details leak without any hacking tools.

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.