Owner Converted to guest in group could view Storage Quotas
A user who was downgraded from Owner to Guest in a GitLab group could still retrieve the group's storage quota details by replaying a previously captured GraphQL request. The attacker could view storage statistics for the group and its projects despite having no access to the Usage Quotas page.
GitLab
Originally disclosed on GitLab
- Fixed in 21 months
- Disclosed after 21 months
HackerOne report #843381 by whitehattushu on 2020-04-08, assigned to @cmaxim:
There is a vulnerability that allows the user downgraded from Owner to Guest to view storage quotas even when user has no access
Steps To Reproduce:
1: Start a Group with GitLab gold
2: Add an owner to group
3: Now login into the newly added owner account
4: Go to Administration--->Usage Quotas and keep interceprting requests in burp until you get below request
POST /api/graphql HTTP/1.1
Host: gitlab.com
Connection: close
Content-Length: 800
accept: */*
Sec-Fetch-Dest: empty
X-CSRF-Token:[REDACTED]
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36
content-type: application/json
Origin: https://gitlab.com
Sec-Fetch-Site: same-origin
Sec-Fetch-Mode: cors
Referer: https://gitlab.com/groups/sso-securty-grp/-/usage_quotas
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9
Cookie: _[REDACTED]
[{"operationName":"getStorageCounter","variables":{"fullPath":"sso-securty-grp"},"query":"query getStorageCounter($fullPath: ID!) {\n namespace(fullPath: $fullPath) {\n id\n rootStorageStatistics {\n storageSize\n __typename\n }\n projects(includeSubgroups: true) {\n edges {\n node {\n id\n fullPath\n nameWithNamespace\n avatarUrl\n webUrl\n name\n statistics {\n commitCount\n storageSize\n repositorySize\n lfsObjectsSize\n buildArtifactsSize\n packagesSize\n wikiSize\n __typename\n }\n __typename\n }\n __typename\n }\n __typename\n }\n __typename\n }\n}\n"}]
5: Once you get below request now go to main owner accout and change the permission of newly added owner to guest
6: Now you will see that guest has no access to Storage Quotas as below attached noperm.jpg
7: Now repeat the request you captured above
8: You will get all storage detail of group
Impact
Improper Access to data
Attachments
Warning: Attachments received through HackerOne, please exercise caution!
[REDACTED]
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 GraphQL namespace query for storage statistics did not re-check the caller's current role, so a stale request from a former owner still returned data.
Impact
A demoted guest could still read the group's storage quota and per-project storage statistics, an improper access to data.
What the attacker needed
GitLab Gold group; Attacker was previously an owner; Captured GraphQL request
How it was found
- Create a group and add an owner account.
- Log in as the new owner and open Usage Quotas while intercepting requests.
- Capture the GraphQL request that fetches storage counters.
- As the main owner, change the new owner's role to guest.
- Confirm the guest no longer sees Storage Quotas in the UI.
- Replay the captured request to receive the group's storage details.
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 group owner can see how much storage the group uses. When that person is demoted to a guest, the web page hides this information, but the server still answered the old request. By resending a saved request, the demoted user could still see the storage numbers.
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.