Protected tags API reveals the private groups new name even after they are removed from project membership
A project's protected tags settings retained a group entry after that group was removed from the project and made private, so the protected tags API disclosed the group's new name. An attacker with project access could learn the new name of a private group they no longer had permission to see.
GitLab
Originally disclosed on GitLab
- Fixed in 8 months
- Disclosed after 8 months
HackerOne report #566078 by ashish_r_padelkar on 2019-05-04, assigned to estrike:
Summary
Hello,
At https://gitlab.com/<GroupName>/<ProjectName>/settings/repository#js-protected-tags-settings , you can add a group in protected tags only if it is shared with this project.
When you add such groups here, these group remains there even after they are removed from the projects.
This is issue specially for Private projects because this vulnerability may reveal the new name of the groups( if it renamed after removing).
Steps to reproduce
-
As a project Maintainer, add a group in protected tags here at
https://gitlab.com/<GroupName>/<ProjectName>/settings/repository#js-protected-tags-settingswhich is shared in this project Lets sayGroupA(Public group as of now) -
Other project maintainer/owner , removes this
GroupAfrom this project membership here athttps://gitlab.com/<GroupName>/<ProjectName>/project_membersand then makes it private and then renames it asGroupB -
The other maintainers of the project wont see this new group name as they dont have access to it and is private now.
-
But , it was added in protected tags before, So they can use a below API endpoint
https://gitlab.com/api/v4/projects/<ProjectID>/protected_tags
- This will reveal the new group name through
access_level_descriptionparameter from response!
What is the current bug behavior?
Protected tags API reveals the private group name even after they are removed from project membership
What is the expected correct behavior?
Once group is removed from project membership, they shouldn't be part of protected tags. This works as expected for protected branches but not for protected tags
Output of checks
This bug happens on GitLab.com and might be on omnibus installations too
Regards,
Ashish
Impact
As mentioned previously, this reveals the new private group names even after they are removed from project membership!
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, removing a group from project membership did not clean up protected tag entries that referenced that group, so the API still resolved and displayed the group's current name.
Impact
A project member without access to the now-private group could learn its new name, which is an information disclosure limited to that name.
What the attacker needed
Project Maintainer or Owner role; a group shared with the project; group later removed and made private
How it was found
- As a project Maintainer, add a shared group to the protected tags settings.
- Remove that group from the project membership, make it private, and rename it.
- Request the project's protected tags API endpoint.
- Observe the new private group name in the access_level_description field of the response.
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 share a project with a group, you can also let that group control protected tags. The project kept remembering the group even after it was removed and made private. Because of that, a normal project member could still see the group's new name through an API, even though they were not supposed to have access to it.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.