Private project path & Resource_label_events API reveals labels from Private project if the issue is moved to public project.
When an issue was moved from a private project to a public project, the issue timeline and the resource label events API still showed the private project's path and the names of labels that belonged to the private project. A non-member could therefore learn the private project path and label names from a public issue.
GitLab
Originally disclosed on GitLab
- Fixed in 4 months
- Disclosed after 4 months
HackerOne report #643854 by ashish_r_padelkar on 2019-07-15, assigned to akelly:
dev issue: https://dev.gitlab.org/gitlab/gitlabhq/issues/2919
Summary
Hello,
When issue is moved from private project to public project, the label events are visible to any user on timeline. However, they can see the Private project Path including label IDs because the issue was moved from private to public.
Also, The below API reveals the names of these labels too. This should not be disclosed as these labels belonged to private projects.
https://gitlab.com/api/v4/projects/<Project_ID>/issues/<Current_Issue_ID>/resource_label_events
Steps to reproduce
- Create an issue in your private project.
- Apply labels to it ( repeat this multiple times by adding removing new labels)
- Now move this issue in one of your public project.
- Login as non member.
- Visit the above issue in public project. You will see that issue has lot of label events which discloses the label ID along with private project path from which the issue is moved from.
- Now visit the API
https://gitlab.com/api/v4/projects/<Project_ID>/issues/<Current_Issue_ID>/resource_label_eventsand this will disclose all the label names too
Examples
You can see my project url here https://gitlab.com/newgroup_t/gemnasium-db/issues/9
What is the current bug behavior?
When issue is moved from private project to public project, the timeline activity of issue shows the private project path if the issue had labels applied in private project.
The Resource_label_events API also reveals the labels names too which belonged to private project.
What is the expected correct behavior?
The private project path should not be visible and label names should not be disclosed in Resource_label_events API
Output of checks
This bug happens on GitLab.com and might be on omnibus installations too!
Regards,
Ashish
Impact
-
Private project Path is visible when issue is moved from private project to public project only when there are label events
-
`Resource_label_events API reveals all the label names too that were applied in private project!
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 label event records kept referencing the original private project and its labels, and the timeline and API did not filter out data from projects the viewer cannot access.
Impact
A non-member could see the private project path and the names of labels from a private project, which may reveal internal project and label naming.
What the attacker needed
A private project; ability to move an issue to a public project; victim is a non-member viewing the issue
The fix
The private project path should be hidden and label names from private projects should not be returned by the API.
How it was found
- Create an issue in a private project.
- Apply labels to it, adding and removing labels several times.
- Move the issue to a public project.
- Log in as a non-member and view the issue in the public project.
- Observe the label events showing the label ID and private project path.
- Request the resource label events API for the issue to see the label names.
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 private project is meant to be hidden from people who are not members. When an issue is moved to a public project, some leftover information about where it came from stayed visible. That let anyone see the name of the private project and the labels used there.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.