Removed developer users from public project can close and edit merge request created by them
A removed developer from a public project could still edit and close merge requests they had created while a member. This allowed them to modify or close merge requests despite no longer having a role in the project.
GitLab
Originally disclosed on GitLab
- Fixed in 2 days
- Disclosed after 2 days
HackerOne report #1401296 by ashish_r_padelkar on 2021-11-16, assigned to @nmalcolm:
Report | Attachments | How To Reproduce
Report
Summary
Hello,
A removed developer user from public projects can still able to edit and close/reopen merge requests created by them when they were developers in project.
As per this https://docs.gitlab.com/ee/user/project/merge_requests/#close-a-merge-request, only users with Developer and higher role should be able to close the merge requests but in this case, member is no longer part of the team but still able to close the merge requests(created by them).
Steps to reproduce
-
Login as a developer in any public project and create a merge request at
https://gitlab.com/<NameSpace>/<ProjectName>/-/merge_requests/new. -
Admin removes the developer from the public project.
-
As a former developer (now not a part of the project) go the merge request that you created when you were the developer.
-
You see, you can edit and close the merge request button which shouldn't be possible as per the document provided above! Only developers and higher role should be able to close the merge request but currently you dont have any role in the project!

- You can also edit the title, description etc which should also be restricted .
What is the current bug behavior?
Removed developers can still edit their merge requests and close the merge request which is against documentation.
What is the expected correct behavior?
Only developer and higher role should be able to close the merge requests.
Output of checks
This bug happens on GitLab.com
Regards,
Ashish
Impact
Removed developers can still edit their merge requests and close the merge request which is against documentation.
Attachments
Warning: Attachments received through HackerOne, please exercise caution!
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 application checks the merge request author's original permissions rather than their current project membership when authorising edit and close actions.
Impact
A removed developer could still edit and close merge requests they had created, contrary to documented permissions.
What the attacker needed
Public project; user was a developer and created a merge request; user removed from project
How it was found
- Log in as a developer in a public project and create a merge request.
- Have an admin remove the developer from the project.
- As the former developer, go to the merge request you created.
- Observe that you can still edit and close the merge request.
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 merge request is a way to propose changes to a project. Normally, only current project members with at least the Developer role can close or edit merge requests. Here, someone who was removed from the project could still do those actions on merge requests they had made earlier.
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.