Group Maintainers can Update/Delete group runners using API
Group Maintainers could use API endpoints to update or delete group runners, which they should not be allowed to do.
GitLab
Originally disclosed on GitLab
- Fixed in 4 months
- Disclosed after 4 months
HackerOne report #685239 by ashish_r_padelkar on 2019-08-30, assigned to jmatos_bgtvf:
Summary
Hello,
This report #566515 is fixed but there are couple of endpoints in API which allows Group Maintainers to update and even delete the group runners.
Steps to reproduce
- As a group maintainer, obtain your personal access token
- Run the following API endpoints to update/delete
Update
curl --request PUT --header "PRIVATE-TOKEN: <YourTokenHere>" "https://gitlab.com/api/v4/runners/<GroupRunnerID>" --form "description=test-1-20150125-test" --form "tag_list=ruby,mysql,tag1,tag2"
Delete
curl --request DELETE --header "PRIVATE-TOKEN: <YourTokenHere>" "https://gitlab.com/api/v4/runners/<GroupRunnerID>" --form "description=test-1-20150125-test" --form "tag_list=ruby,mysql,tag1,tag2"
GroupRunnerID can be easily obtained using projects ci/cd settings where ID is displayed in UI
What is the current bug behavior?
Group Maintainers are allowed to update/delete group runners using API
What is the expected correct behavior?
Group Maintainers should not be able to do this
Output of checks
This bug happens on GitLab.com and possibly on omnibus installations too
Regards,
Ashish
Impact
Group Maintainers are allowed to update/delete group runners using API
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
What the attacker needed
A group maintainer account; a personal access token; knowledge of the group runner ID
The fix
The API should prevent group maintainers from updating or deleting group runners.
How it was found
- As a group maintainer, obtain your personal access token
- Run the API endpoint to update a group runner
- Run the API endpoint to delete a group runner
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 'runner' is a server that runs your automated tests and builds. A 'maintainer' is a user role with some admin rights but not full control. The report shows that maintainers could use a special API to change or delete runners, which they shouldn't be able to do.
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.