Skip to content
Access control Disclosed report Intermediate

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

404_not_found.png
404_not_found.png From the original on GitLab

But merge requests will be created.

merge_request_create_by_attacker.png
merge_request_create_by_attacker.png From the original on GitLab

Thanks!

Impact

Attacker with Guest role will create merge requests via forking a project.

Attachments

Warning: Attachments received through HackerOne, please exercise caution!

The original report as published on GitLab. Images and videos are our own copies; raw HTML is shown as text. View it on GitLab.

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

  1. Create a private project.
  2. Invite the attacker as a Reporter.
  3. The attacker forks the project.
  4. Change the attacker's role from Reporter to Guest.
  5. The attacker creates a merge request via their forked project.
  6. 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.

More from GitLab

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Broken access control

The lesson behind this report.

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.