Skip to content
Access control Disclosed report Intermediate

Issues created from vulnerability can be removed by developers

GitLab

Originally disclosed on GitLab

  • Fixed in 13 months
  • Disclosed after 13 months

HackerOne report #1414079 by ashish_r_padelkar on 2021-12-01, assigned to @dcouture:

Report | Attachments | How To Reproduce

Report

Summary

Hello,

When you create issue for a vulnerability, it is not allowed to be removed and you clearly see a tool tip mentioning the same.

Screen_Shot_2021-12-01_at_1.11.39_PM.png
Screen_Shot_2021-12-01_at_1.11.39_PM.png From the original on GitLab

However, it is possible to remove such issues from vulnerabilities using this vulnerability. This action may be restricted to Project owner/maintainer but currently even developers are able to remove such issues!

Steps to reproduce
  1. As a project admin go to https://gitlab.com/<NameSpace>/<ProjectName>/-/security/vulnerability_report and look for any vulnerabilities.
  2. If you don't see any, create one for reproducing this issue using graphql

Go to https://gitlab.com/-/graphql-explorer

mutation vulnerabilityCreate($input: VulnerabilityCreateInput!) {  
  vulnerabilityCreate(input: $input) {  
    clientMutationId  
    vulnerability: vulnerability {  
      id  
      project {  
        id  
        fullPath  
      }  
    }  
  }  
}

In Query Variables

{
  "input": {  
    "project": "gid://gitlab/Project/23887195",  
    "name":  "CreatedUsingGraphql",  
    "description": "CreatedUsingGraphql",  
    "scanner": {"version": "1","name": "CreatedUsingGraphql","id": "1","url": "http://google.com"},  
    "state": "CONFIRMED",  
    "identifiers": [  
      {  
      	"name": "CVE12345",  
      	"url": "https://google.com"  
    	}  
    ]  
  }  
}

Replace project ID in above variables23887195.

  1. Now you should see a vulnerability there.

  2. Go inside the detail page and you see there is a Create Issue button there. Just create an issue using this button and go again to the same page.

  3. You should see now issue appear there but you can not remove this issue from there. You should see a tooltip mentioning the same too.

  4. Now login as a Developer user in the project and go to same page.

  5. Just click on + besides linked issue and link one already existing issue.

Screen_Shot_2021-12-01_at_1.22.54_PM.png
Screen_Shot_2021-12-01_at_1.22.54_PM.png From the original on GitLab
  1. You see that you can remove this linked issue.

  2. Just remove the linked issue and capture the request like below.

DELETE /api/v4/vulnerabilities/24888989/issue_links/35313 HTTP/2  
Host: gitlab.com  
Cookie: 1  
Accept: application/json, text/plain, */*  
X-Csrf-Token: 1  
Sec-Ch-Ua-Mobile: ?0  
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.55 Safari/537.36  
X-Requested-With: XMLHttpRequest  
Sec-Ch-Ua-Platform: "macOS"  
Origin: https://gitlab.com  
Sec-Fetch-Site: same-origin  
Sec-Fetch-Mode: cors  
Sec-Fetch-Dest: empty  
Referer: https://gitlab.com/g2423/githubimport/-/security/vulnerabilities/24888989  
Accept-Encoding: gzip, deflate  
Accept-Language: en-US,en;q=0.9


  1. Now go to https://gitlab.com/api/v4/vulnerabilities/24888989/issue_links and in response you will see vulnerability_link_id of the issue that is not removable as it was created from the vulnerability.

  2. Just replace this value in above request like DELETE /api/v4/vulnerabilities/24888989/issue_links/<ReplaceThisWithNonRemovableIssue> HTTP/2 and send the request.

  3. Go back to the vulnerability detail page and you will see that issue is removed which is not possible otherwise!

What is the current bug behavior?

Issues created from vulnerability can be removed by developers

What is the expected correct behavior?

Issues created from vulnerability should be able to be removed as per tooltip.

Output of checks

This bug happens on GitLab.com

Regards,
Ashish

Impact

Issues created from vulnerability can be removed by developers

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.

What is known

A low-severity access control bug in gitlab.com. GitLab made it public on 12 June 2023.

About 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.

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.

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.