Skip to content
Info disclosure Disclosed report Beginner

Merge request ID visible in pipeline view for users without merge request access

For public projects with merge requests restricted to project members, and for private projects where guest users lack merge request access, the pipeline view still displayed the ID of the associated merge request. An unauthenticated user or a guest could therefore learn the merge request ID, which should have been hidden.

GitLab

Originally disclosed on GitLab

  • Fixed in 13 months
  • Disclosed after 13 months

HackerOne report #697217 by xanbanx on 2019-09-18, assigned to @jritchey:

Hi GitLab Security Team,

Summary

For public projects, GitLab allows to restrict the visibility of merge requests to project members only. However, even this is done, merge request IDs for pipelines are publicly visible for users without merge request access. The same issue happens in private projects, where Guest users without MR access can also read the associated merge request ID.

Steps to reproduce

  1. Create a public project and restrict merge requests to project members only
  2. Push some code and a CI configuration. Note that the CI configuration requires pipelines for merge requests enabled via only: merge_requests like the following example:
YAML
image: busybox:latest

build1:  
  stage: build  
  script:  
    - echo "Do your build here"

test1:  
  stage: test  
  script:  
    - echo "Do a test here"  
    - echo "For example run a test suite"  
  only:  
  - merge_requests

test2:  
  stage: test  
  script:  
    - echo "Do another parallel test here"  
    - echo "For example run a lint test"  
  1. Push some code and create a merge request
  2. As an unauthenticated user, https://example.gitlab.com/<namespace>/<project>/pipelines/<pipeline-id>, where <pipeline-id> is the ID of the pipeline associated with this merge request. The pipeline list shows them as detached
  3. This page leaks the associated merge request ID

The same happens for private projects, where guest user members of the project can also see the merge request ID on the same page.

Impact

Merge request ID is visible to unauthorized users.

Examples

As an unauthenticated user, visit https://gitlab.com/wter33/test-ci/pipelines/82944750. Here, the associated merge request !1 is referenced.

What is the current bug behavior?

Merge request ID leaked to unauthorized users despite merge requests are restricted to project members only or user only has guest access to the project (thus no merge request access).

What is the expected correct behavior?

When merge requests are restricted to project members only or user is a guest member of the project, the pipelines view should not display the associated merge request ID.

Output of checks

This bug happens on GitLab.com

Best regards,
Xanbanx

Impact

See above.

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 pipeline view did not apply the same merge request visibility checks when rendering the associated merge request reference.

Impact

An unauthenticated user or a guest member could see the merge request ID, which should have been restricted to project members.

What the attacker needed

Public project with MRs restricted to members; or private project with guest user; no authentication needed for public case

The fix

The pipelines view should not display the associated merge request ID when merge requests are restricted to project members or the user is a guest.

How it was found

  1. Create a public project and restrict merge requests to project members only.
  2. Push code and a CI configuration that runs pipelines for merge requests.
  3. Create a merge request.
  4. As an unauthenticated user, visit the pipeline page for the pipeline associated with that merge request.
  5. Observe that the page shows the associated merge request ID.

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.

The pipeline page still showed the merge request's number, so unauthorised users could see its ID.

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.