Guest users in projects can see TEST CASES with public pipelines disabled
A guest user in a private project could view test cases even when public pipelines were disabled, because the test cases page did not enforce the same access control as the CI/CD menu. An attacker with guest access could directly navigate to the test cases URL and see test case information that should have been restricted.
GitLab
Originally disclosed on GitLab
- Fixed in 49 days
- Disclosed after 49 days
HackerOne report #1034392 by ashish_r_padelkar on 2020-11-14, assigned to @cmaxim:
Report | How To Reproduce
Report
Summary
Hello,
A guest user in private project can see Test Cases at https://gitlab.com/<NameSpace>/<ProjectName>/-/quality/test_cases even when public pipelines at /-/settings/ci_cd#js-general-pipeline-settings are disabled.
I did not find any official documentation for this yet but looks like this information shouldnt be visible to guest users when public pipelines are disabled as guest dont see CI/CD menu in project where this option is available to see the test cases.
Steps to reproduce
- Create a private project and create a test case at
/-/quality/test_cases. - Disable the public pipeline of the project at
/-/settings/ci_cd#js-general-pipeline-settings. - Login as a guest user in this private project and you wont be able to see this
CI/CDmenu option. - Directly navigate to
https://gitlab.com/<NameSpace>/<ProjectName>/-/quality/test_casesand you should be able to access the page where test cases are listed.
What is the current bug behavior?
Test cases are visible to guest users when public pipelines are disabled.
What is the expected correct behavior?
I think these test cases shouldnt be visible to guest users as ci/cd menu is not visible.
Output of checks
This bug happens on GitLab.com `GitLab Enterprise Edition 13.6.0-pre 19ee559f49a
Regards,
Ashish
Impact
Guest users in private project can see test cases despite no access to public pipelines
How To Reproduce
Please add reproducibility information to this section:
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 test cases page did not check the public pipelines setting or the user's role, allowing guest users to access it directly.
Impact
Guest users in a private project could see test cases despite no access to public pipelines.
What the attacker needed
A private project; a guest user account; public pipelines disabled
How it was found
- Create a private project and create a test case.
- Disable the public pipeline of the project.
- Login as a guest user in this private project.
- Directly navigate to the test cases URL to access the page.
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 a private project, a guest is a user with limited permissions. The project had a setting to disable public pipelines, which should hide CI/CD features. However, the test cases page was still accessible to guests by directly visiting its URL, even though the CI/CD menu was hidden. This means guests could see test case information they were not supposed to see.
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.