Guests will create merge requests via forking a project.
A user with the Guest role could still create merge requests in a private project by forking it while they were a Reporter, then being downgraded to Guest. The attacker could create merge requests despite lacking the permission to do so.
GitLab
Originally disclosed on GitLab
- Fixed in 12 months
- Disclosed after 12 months
HackerOne report #762358 by hackrzvijay on 2019-12-20, assigned to @ankelly:
Hello!
Reproduction Steps:
I request to view this video poc for clear understanding
Create Private project.
Invite attacker as reporter first.
Attacker will fork the project.
Next change the attacker from reporter to guest.
Attacker will create merge requests via project which he has forked.
Attacker will get 404 not found page

But merge requests will be created.

Thanks!
Impact
Attacker with Guest role will create merge requests via forking a project.
Attachments
Warning: Attachments received through HackerOne, please exercise caution!
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 permission check for creating merge requests from a fork did not re-evaluate the user's current role in the upstream project after a role change.
What the attacker needed
Attacker is a member of the private project; attacker initially has Reporter role; attacker's role is later changed to Guest
How it was found
- Create a private project.
- Invite the attacker as a Reporter.
- The attacker forks the project.
- Change the attacker's role from Reporter to Guest.
- The attacker creates a merge request via their forked project.
- The attacker sees a 404 page but the merge request is created.
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 Guest is a low-permission role that should not be able to create merge requests. A merge request is a request to merge code changes into a project. The report shows that if someone forks a project while they have higher permissions, then is downgraded, they can still create merge requests through their fork.
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.