Skip to content
Info disclosure Disclosed report Beginner

Last pipeline status for MR leaked

An internal endpoint on merge request pages returned the last pipeline status to any user with merge request access, even when pipeline visibility was restricted to project members. An unauthorised user could therefore learn whether a pipeline was running and its details path.

xanbanx Follow

Originally disclosed on HackerOne

  • Triaged in 4 days
  • Fixed in 3 months
  • Paid in 3 months
  • Disclosed after 5 months

Hi GitLab security team,

Summary

GitLab allows for public and internal projects to restrict the visibility of pipelines to project members only. Then, only project members should have access to the pipeline information.

However, this can be bypassed. There is a internal endpoint (:namespace/:project_name/merge_requests/:iid/pipeline_status) on each merge request page allowing anyone with merge request access also view the last pipeline status for this merge request.

Steps to reproduce

  1. Create a public project, disable public pipelines, and restrict the visibility of pipelines to project members only
  2. Setup the repo such that there is a CI job, and create a merge request
  3. As an unauthorized user, perform the following request in the browser: https://example.gitlab.com/<namespace>/<project>/merge_requests/1/pipeline_status. This will return a JSON response with a content similar to the one like this leaking the pipeline status:
{
    "icon": "status_running",
    "text": "running",
    "label": "running",
    "group": "running",
    "tooltip": "running",
    "has_details": false,
    "details_path": "/test-project/testproject/pipelines/37",
    "illustration": null,
    "favicon": "https://example.gitlab.com/assets/ci_favicons/favicon_status_running-9c635b2419a8e1ec991c993061b89cc5aefc0743bb238ecd0c381e7741a70e8c.png"
}

This information is only limited to project members only and thus is leaked to everyone with project and merge request access.

Impact

Unauthorized users have access to the pipeline status of a merge request.

What is the current bug behavior?

An unauthorized user can make this request and successfully can get information to attached pipelines.

What is the expected correct behavior?

This request above should return 403 Forbidden, if the user does not have access to view pipelines.

Output of checks

This happens on gitlab.com

Best regards, Xanbanx

Impact

Unauthorized users have access to the pipeline status of a merge request.

The original report as published on HackerOne, by xanbanx. Images and videos are our own copies; raw HTML is shown as text. View it on HackerOne.

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 pipeline status endpoint checked merge request access but did not enforce the project's pipeline visibility setting.

What the attacker needed

Public project with restricted pipelines; a merge request with a CI job; attacker has merge request access

The fix

The endpoint should return 403 Forbidden when the user cannot view pipelines.

How it was found

  1. Create a public project and restrict pipeline visibility to project members.
  2. Add a CI job and open a merge request.
  3. As an unauthorised user, request the merge request pipeline status endpoint.
  4. Observe the JSON response leaking the pipeline status.

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 project can be set so that only its members see the results of its automated build jobs, called pipelines. The report shows that a small helper page on each merge request still told anyone the latest build status, so the restriction could be bypassed.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

More by xanbanx

View all

6 more disclosed reports, best first.

More from GitLab

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.