Cross-project pipelines leak pipeline status of private downstream pipelines and private project name
A public project's pipeline view displayed the status and name of a private downstream project's pipeline. An unauthenticated user could learn the private project's name and whether its pipeline succeeded.
GitLab
Originally disclosed on GitLab
- Fixed in 12 months
- Disclosed after 12 months
HackerOne report #697668 by xanbanx on 2019-09-19, assigned to @jritchey:
Hi GitLab Security Team,
Summary
GitLab supports cross-project pipelines. Here, the pipeline of one project triggers the pipeline of another project (downstream project).
However, if the downstream project is private, the upstream project's pipeline view leaks the pipeline status of the private downstream pipeline as well as the private project name.
Steps to reproduce
Tested on GitLab Enterprise Edition 12.3.0-pre 32dae28364b
- Create a public group named
public-group - Within the public group, create a private project named
private-project - In the private project, Add a
.gitlab-ci.ymlfile with the following content:
build_image:
script:
- echo "private project"
- Within the public group, create a public project named
public-project - In the public project, Add a
.gitlab-ci.ymlfile with the following content:
stages:
- build
- test
build_image:
stage: build
script:
- echo "public project"
downstream_pipeline:
stage: test
trigger: public-group/private-project
- As an unauthenticated user, visit
https://example.gitlab.com/public-group/public-project/pipelinesand click on the last pipeline - The pipeline graph now leaks the pipeline status of the private downstream pipeline as well as the private project name
Impact
Unauthorized users can see the pipeline status of private downstream pipelines. Furthermore, they can access the name of private projects.
Examples
Goto https://gitlab.com/public-group-docker/public-project/pipelines/83132075
Here you see that the private downstream pipeline succeeded and also the name of the private repository.
What is the current bug behavior?
Private downstream pipelines are visible to unauthorized users thus leaking the pipeline status of private project's pipelines and the name of private projects.
What is the expected correct behavior?
Do not show downstream pipelines if user has no access to the private project.
Output of checks
This bug happens on GitLab.com
Best regards,
Xanbanx
Impact
See above.
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 graph did not check whether the viewer had permission to see the downstream project before showing its name and status.
Impact
An unauthenticated user could see the name of a private project and whether its downstream pipeline succeeded or failed.
What the attacker needed
A public project that triggers a private downstream project; no account needed to view the public pipeline
How it was found
- Create a public group and a private project inside it.
- Add a minimal CI configuration to the private project.
- Create a public project in the same public group.
- Add a CI configuration to the public project that triggers the private project as a downstream pipeline.
- As an unauthenticated user, open the public project's pipelines page and click the latest pipeline.
- Observe the private project's name and pipeline status in the pipeline graph.
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 pipeline is a set of automated jobs that run when code changes. A public project can trigger a pipeline in another project, called a downstream project. If that downstream project is private, its details should not be visible to outsiders, but the public project's pipeline page showed the private project's name and whether its pipeline worked.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.