Skip to content
Info disclosure Disclosed report Beginner

Forked Project's Information is Still Being Disclosed in Project API after being changed to Private

After a public GitLab project was made private, its fork relationship persisted, so a user who had forked it could still see the private project's information through the API. This allowed continued spying on the now-private project.

GitLab

Originally disclosed on GitLab

  • Fixed in 6 months
  • Disclosed after 6 months

HackerOne report #575814 by ngalog on 2019-05-10, assigned to asaba:

Summary

In Github, once the repo goes private, all the fork relationship they had before will be erased, this is for privacy reason because once the project go private, no related info should be disclosed.

However in Gitlab, even the project goes private, the previously forked repo can still get the private project's info, i.e. the fork relationship persists. Thus disclosing info of the private project.

Steps to reproduce

  • Create a new project say the name is foo project as user A
  • User B fork foo project, and now user B's forked project is bar project
  • User A set the permission of the project to private in https://gitlab.com/PROJECT_PATH/edit
  • User B should not be able to view https://gitlab.com/PROJECT_PATH/ anymore, which is good
  • However User B can still somehow spy on foo project by visiting the link https://gitlab.com/api/v4/projects/ID_OF_BAR_PROJECT, and the value of fork_from_project will be the info of foo project

Impact

Keep on spying on private project if it was public before

What is the current bug behavior?

Allow user to keep on spying on private project if it was public before

What is the expected correct behavior?

All fork relationship should be detached after public project goes private

Relevant logs and/or screenshots

anotherpoc2.PNG
anotherpoc2.PNG From the original on GitLab

Impact

Keep on spying on private project if it was public before

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 fork relationship was not detached when a project's visibility was changed to private.

Impact

A user with a fork could continue to view information about a project that had been made private.

What the attacker needed

A GitLab account; the project was public before going private; the attacker has forked the project

How it was found

  1. Create a new project as user A.
  2. User B forks that project.
  3. User A sets the project to private.
  4. User B can no longer view the project page.
  5. User B visits the API endpoint for their forked project and sees the private project's info in the fork_from_project field.

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 a project is made private, its details should no longer be visible to others. Here, a user who had forked the project could still see its information through an API endpoint, because the fork link was not removed.

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.