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!

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:
-
As a project owner of public project, set visibility of pipeline to
Only Project Membersand rest shown in screen shot. -
Now as a normal gitlab user, run below API
curl --header "PRIVATE-TOKEN: <Token>" "https://gitlab.com/api/v4/projects/<ID>/repository/commits/<CommitSha>"
- 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!
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
- As a project owner of a public project, set pipeline visibility to 'Only Project Members'.
- As a normal GitLab user, call the commit API endpoint for a commit in that project.
- 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.