Skip to content
Access control Disclosed report Intermediate

Demoted Guest user can change Title, Description, Archive/Reopen and Delete Requirements via Issues

A user who created a requirement while holding the Reporter role could still edit, archive, reopen and delete it after being demoted to Guest, by reaching the same object through the Issues and work items URLs. The attacker could therefore modify or remove requirement content despite no longer having the permission to do so.

GitLab

Originally disclosed on GitLab

  • Fixed in 8 months
  • Disclosed after 8 months

⚠️ Please read the process on how to fix security issues before starting to work on the issue. Vulnerabilities must be fixed in a security mirror.

HackerOne report #2123430 by toukakirishima on 2023-08-25, assigned to @greg:

Report | Attachments | How To Reproduce

Report

Summary

I found a IDOR vulnerability when visit issues path, as an attacker I can change Title, Description, Archive/Reopen and Delete Requirements via Issues.

Normally you can't change Title, Description, Archive/Reopen and Delete Requirements as Guest role even though you made it.

image.png
image.png From the original on GitLab

And if you edit the title or description via graphql you will see a warning message (The resource that you are attempting to access does not exist or you don't have permission to perform this action)

image.png
image.png From the original on GitLab

But as an attacker I can change Title, Description, Archive/Reopen and Delete Requirements as Guest role

image.png
image.png From the original on GitLab

According to the following article member must have at least the Reporter role to edit a requirement.

You must have at least the Reporter role.

According to the following article member must have at least the Reporter role to archive a requirement.

You must have at least the Reporter role.

According to the following article member must have at least the Reporter role to reopen a requirement.

You must have at least the Reporter role.

And there is no documentation if requirement can be removed.

NOTE

This vulnerability only applies to (attacker) when making requirements (before the attacker becomes a Guest role).

Let's say Touka Attacker (Reporter Role) is the attacker and Touka Kirishima is the victim.

image.png
image.png From the original on GitLab

And Touka Attacker (attacker) create requirement and then revealed to Guest Role.

image.png
image.png From the original on GitLab
image.png
image.png
Steps to reproduce
  1. Go to Requirements and choose that you have made and copy the ID. Example ID: 16
image.png
image.png From the original on GitLab
  1. Go to Issues URL and paste ID. Example : https://gitlab.com/toukak2/zzzz/-/issues/16
image.png
image.png From the original on GitLab
  1. Edit then save change, and now you successfully edit title, description, and archive/reopen Requirements.
image.png
image.png From the original on GitLab
  1. To remove the Requirements change the URL to work_items. Example : https://gitlab.com/toukak2/zzzz/-/work_items/16
image.png
image.png From the original on GitLab
  1. Delete Requirements and now you successfully delete the Requirements
image.png
image.png From the original on GitLab
POC
bandicam_2023-08-25_20-14-33-409.mp4 From the original on GitLab
Output of checks

This bug happens on GitLab.com

Impact

Attacker can still change Title, Description, Archive/Reopen and Delete Requirements via Issues even though the attacker has been revealed to be the Guest role.

Attachments

Warning: Attachments received through HackerOne, please exercise caution!

How To Reproduce

Please add reproducibility information to this section:

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 Issues and work items endpoints did not re-check the caller's current role against the requirement object, so authorisation relied on the role held when the record was created.

Impact

A demoted Guest could still change the title and description of a requirement and archive, reopen or delete it, although the documentation requires at least the Reporter role for those actions.

What the attacker needed

Attacker created the requirement as Reporter; attacker later demoted to Guest

How it was found

  1. Open Requirements and copy the ID of a requirement you created.
  2. Open the Issues URL for that ID.
  3. Edit and save to change the title, description, or archive/reopen state.
  4. Change the URL to the work_items path for the same ID.
  5. Delete the requirement.

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.

A requirement is a record in a project that normally only people with a certain level of access can change. The site blocked edits through one route, but not when the same record was opened through a different address. So someone whose access had been reduced could still change or delete the record by using that other address.

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.