User is able to export MRs via BE api which is restricted from UI
GitLab
Originally disclosed on GitLab
- Fixed in 3 days
- Disclosed after 3 days
HackerOne report #1048347 by atc_h1h1 on 2020-12-01, assigned to @rchan-gitlab:
Report | How To Reproduce
Report
User is able to export MRs via BE api which is restricted from UI
Summary
User is able to export MRs via BE api which is restricted from UI.
Steps to reproduce
- Login with UserA and create a project prjA with MRs and Issues.
- Login with UserB and go to the project prjA
- Go to the project merge requests page - https://gitlab.com/userA/prjA/-/merge_requests
- Try to export MRs in CSV from UI. From FE, it is restricted to export MRs in CSV file.
- Now go to Issues, - https://gitlab.com/userA/prjA/-/Issues
- Now open proxy tool and intercept request to export Issues as CSV and replace issues with merge_requests and send it.
- You would receive MRs in email.
Below is the request:
POST /userA/prjA/-/merge_requests/export_csv HTTP/1.1
Host: gitlab.com
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:83.0) Gecko/20100101 Firefox/83.0
Below is the response:
HTTP/1.1 302 Found
Date: Tue, 01 Dec 2020 16:55:38 GMT
Content-Type: text/html; charset=utf-8
Connection: close
Impact
User is able to export restricted MRs in email
(Summarize the impact on users)
Improper access control.
What is the current bug behavior?
User is able to export MRs via BE api which is restricted from UI.
What is the expected correct behavior?
User shouldn't be able to export MRs via BE api.
Impact
Restricted content is exported
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.
What is known
A low-severity access control bug in gitlab.com. GitLab made it public on 6 December 2020.
About 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.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
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.