Skip to content
Info disclosure Disclosed report Beginner

Last pipeline status visible in commits api despite `Only Project Members`

A public project's pipeline visibility was set to 'Only Project Members', but the commit API still returned the last pipeline status to any authenticated user. An attacker could learn whether a pipeline failed and obtain its ID and web URL.

GitLab

Originally disclosed on GitLab

  • Fixed in 10 months
  • Disclosed after 10 months

HackerOne report #507070 by ashish_r_padelkar on 2019-03-09, assigned to hackerjuan:

Summary:
Hello,

When public project has Pipeline visibility set to Only Project Members and rest as shown in screen shot , It is expected that none of its details should be visible to other users!

Screenshot_2019-03-09_at_11.46.37.png
Screenshot_2019-03-09_at_11.46.37.png From the original on GitLab

Description:

Despite above settings, The last run pipeline status is visible to other users through commit API endpoint

curl --header "PRIVATE-TOKEN: <Token>" "https://gitlab.com/api/v4/projects/<ID>/repository/commits/<CommitSha>"  

Steps To Reproduce:

  1. As a project owner of public project, set visibility of pipeline to Only Project Members and rest shown in screen shot.

  2. Now as a normal gitlab user, run below API

curl --header "PRIVATE-TOKEN: <Token>" "https://gitlab.com/api/v4/projects/<ID>/repository/commits/<CommitSha>"  
  1. See the response.
last_pipeline":{"id":<ID>,"sha":"xyz","ref":"master","status":"failed","web_url":"https://gitlab.com/<userName>/<ProjectName>/pipelines/<ID>"},"project_id":<ID>}  

Regards,
Ashish

Impact

This information should not be visible for normal users when pipelines are set as project members only!

Attachments

Warning: Attachments received through HackerOne, please exercise caution!

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 commit API endpoint did not check the pipeline visibility setting before including the last_pipeline field in its response.

Impact

A normal user could see the last pipeline status, its ID, and its web URL for a project where pipelines were restricted to members only.

What the attacker needed

A GitLab account; a private token for the API; knowledge of a public project ID and commit SHA

How it was found

  1. As a project owner of a public project, set pipeline visibility to 'Only Project Members'.
  2. As a normal GitLab user, call the commit API endpoint for a commit in that project.
  3. Observe that the response includes the last_pipeline 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.

A project can be public, but some parts like pipelines are meant to be visible only to members. The commit API is a way to get information about a code change. It was returning the pipeline status even though the setting said only members should see it, so any logged-in user could see it.

What is Info disclosure?

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

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.