Skip to content
Info disclosure Disclosed report Beginner

Private project path (forked) & branch visible in merge requests

A private forked project's path and branch name were shown publicly in merge requests from that private project to a public project. An attacker could see this information even after the fork relationship was removed and the path updated.

GitLab

Originally disclosed on GitLab

  • Fixed in 4 months
  • Disclosed after 4 months

HackerOne report #724895 by ashish_r_padelkar on 2019-10-29, assigned to @ankelly:

Summary

Hello,

When public project is forked by private project, the private project can request to merge into public project merge request. In such merge requests the project path and branch name of private forked projects publicly visible in request to merge sections.

The project path is continues to be visible even when forked relationship is removed and then updated paths are visible too.

Steps to reproduce

  1. Create a public project
  2. Fork it in private project
  3. Create a merge request from private to public project
  4. Now login as non member and visit the above merge request. You should see the path of the private forked project publicly along with the name in Request to merge section of merge request.
Screenshot_2019-10-29_at_21.08.28.png
Screenshot_2019-10-29_at_21.08.28.png From the original on GitLab
  1. Now remove the fork relationship from private project and update the path of the private project
  2. Again visit the same merge request and you should see the updated name too!

What is the current bug behavior?

Shows the private forked project path and branch name publicly in merge requests.

What is the expected correct behavior?

If forked project is private, none of its information should be visible publicly.

Output of checks

This bug happens on GitLab.com and might be on omnibus installations too!

Regards,
Ashish

Impact

Private project path and branch name visible in merge requests publicly if project is forked in private projects

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 merge request page did not properly check the visibility of the source project when displaying the 'Request to merge' section, so it showed the private project's path and branch to all viewers.

Impact

A non-member could see the private project's path and branch name, and this information remained visible even after the fork relationship was removed and the path changed.

What the attacker needed

A public project; a private fork of that project; a merge request from the private fork to the public project; no special access needed to view the merge request

How it was found

  1. Create a public project
  2. Fork it in a private project
  3. Create a merge request from the private project to the public project
  4. Log in as a non-member and visit the merge request to see the private project's path and branch name
  5. Remove the fork relationship from the private project and update its path
  6. Visit the same merge request again to see the updated name

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.

When you fork a project, you make a copy of it. If that copy is private, its name and branch should stay secret. But here, a merge request from the private copy to a public project revealed those details to anyone, even people not logged in.

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.