Add a permission check in ProjectExportWorker to make sure user has sufficient permissions at export time
A project export job was queued without re-checking the requesting user's permissions when it ran, so a user who lost access before execution could still have the export proceed.
GitLab
Originally disclosed on GitLab
- Fixed in 3 months
- Disclosed after 3 months
This is the 3rd vulnerability described at https://gitlab.com/gitlab-org/gitlab-ce/issues/67109
This is where the third vulnerability can be found. When an export job is scheduled, it assumes the user is authorized to make the export. Ideally, the Sidekiq job (
ProjectExportWorker) that is scheduled would do an authorization check to make sure that the user is authorized to export the project. This would also avoid a TOCTOU issue where the user schedules a job when the queue is clogged / Sidekiq workers are paused and would leave the project before the job is executed.
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
Impact
A user who lost access before the job ran could still have the export proceed, and a clogged queue widened the window for this.
What the attacker needed
Ability to schedule a project export; access revoked before job runs
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.
When you ask a site to export a project, the check happens when you make the request, not when the background job later runs. If your access is removed in between, the job may still run without re-checking, which is a time-of-check to time-of-use problem.
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.