Skip to content
Access control Disclosed report Beginner CVE-2019-5463

Last build status and coverage leaked to unauthorized users

GitLab CI badges for build status and coverage did not enforce pipeline access restrictions, allowing unauthorised users to view the status of any branch. An attacker could learn whether builds succeeded or failed and coverage percentages for branches they should not have access to.

xanbanx Follow

Originally disclosed on HackerOne

  • Fixed in 8 months
  • Paid in 4 months
  • Disclosed after 8 months

GitLab CI supports creating badges for the latest build/coverage on a certain branches. However, with restricted access, where users do not have access to pipelines, users still have access to the build/coverage status of any branch. This access works for different configurations:

  1. For public projects with restricted pipeline access, any user (the user does not need to be signed in) has access to this information
  2. For internal projects with restricted pipeline access, any authenticated user has access to this information
  3. For private projects, any Guest user of that project has access to this information

Steps to reproduce

  1. Create a public repo, configure CI, and push some code. Consider the project namespace to be test/cibadges in these steps.
  2. Restrict the visibility of whole repo to Project Members Only and disable Public builds in the CI settings
  3. As a non-authenticated user visit the following page: https://example.gitlab.com/test/cibadges/badges/master/pipeline.svg

This will return a SVG image showing the build status of the master branch. This works for any other branch as well. The same thing also works with the coverage badge accessible via the following link https://example.gitlab.com/test/cibadges/badges/master/coverage.svg The same works for the other configurations as mentioned above.

Even if repos and therefore also pipelines are completely disabled, the last build status/coverage still can be retrieved via the badges link.

Steps to mitigate

Perform proper authorization check handling a badge request

Impact

Users with restricted pipeline access can see the build/coverage status for different branches

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 badge endpoint did not perform the same authorization checks as the pipeline pages, so it served status data regardless of the user's pipeline access.

Impact

Users with restricted pipeline access could see the build and coverage status for different branches, and this also worked even when repositories and pipelines were completely disabled.

What the attacker needed

Public project with restricted pipelines; or internal project with restricted pipelines; or private project with guest access; no authentication needed for public projects

How it was found

  1. Create a public repository, configure CI, and push code.
  2. Restrict the repository visibility to project members only and disable public builds.
  3. As an unauthenticated user, visit the pipeline badge URL for a branch.
  4. Observe that the badge returns the build status for that branch.
  5. Repeat with the coverage badge URL to see coverage information.

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.

GitLab CI badges are small images that show the latest build status or test coverage for a branch. The report found that these images could be viewed by people who were not allowed to see the project's pipelines, so they could still learn whether builds passed or failed. This is an information leak because access controls were not applied to the badge endpoint.

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 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.

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.