Guest user can see tag names
A guest user on a private GitLab project could see tag names through the releases API, even though guest permissions are meant to hide repository information such as tags. This exposed tag names that should have remained hidden from guests.
GitLab
Originally disclosed on GitLab
- Fixed in 10 months
- Disclosed after 10 months
HackerOne report #833334 by izzsec on 2020-03-28, assigned to @rchan-gitlab:
Summary
According to https://gitlab.com/help/user/permissions "Guest users can access GitLab Releasesfor downloading assets but are not allowed to download the source code nor see repository information like tags and commits.
By querying releases api for a project that user has guest access to they are able to see tag names under the _links.self JSON field
Steps to reproduce
- Create new private project
- Add a guest user
- Go to Home --> Releases https://gitlab.com/<group>/<project>/-/releases
- Click New Release, enter any tagname and click create tag
- As guest user go to Releases the api page at https://gitlab.com/api/v4/projects/<project_id>/releases?per_page=20 will load
- Check the JSON response and see the tag name under _links.self
- Alternatively query the releases API with guest user token
curl -X GET -H "Private-Token: <PRIVATE_TOKEN>" https://gitlab.com/api/v4/projects/<project_id>/releases
JSON snippet with _links.self and tag name
"_links": {
"self": "https://gitlab.com/<group>/<project>/-/releases/<tag_name>"
}
Impact
Guest users can see tag names
Examples
This happens on gitlab.com.
What is the current bug behavior?
Guest users can see tag names
What is the expected correct behavior?
Tag names should not be displayed to guest users.
Impact
Guest users can see tag names
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 releases API included the tag name in a self link without checking whether the caller was allowed to see repository tags.
What the attacker needed
A private project; a guest user account on that project; at least one release with a tag
How it was found
- Create a new private project.
- Add a guest user to the project.
- Create a release with any tag name.
- As the guest user, open the releases API endpoint for the project.
- Inspect the JSON response and find the tag name in the self link.
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.
On GitLab, a guest is a low-privilege user who can see some parts of a private project but is not supposed to see things like tags. The releases feature returned a link that contained the tag name, so the guest could read it even though the interface was meant to hide it.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.