GFM renderer leaks external issue tracker URL of private project
The GFM renderer cross-links issue references to private projects' external issue trackers even when the viewer lacks access, leaking the external URL. A separate ID enumeration in the merge request controller lets an attacker discover all namespace and project names, making the leak practical.
- Triaged in 11 hours
- Fixed in 14 months
- Disclosed after 14 months
Vulnerability details
The GFM renderer has the ability to cross-link issues between projects. When this project is private and the user doesn't have access, the link isn't made. This is good. However, when the private project has an external issue tracker set up, an attacker can extract the external URL from a private project. In some cases, this could lead to the disclosure of the issue.
Proof of concept
As a victim, set up a new private project and activate an external issue tracker. I used Jira to reproduce my find. Lets say the victim's project can be found at root/secret. Now sign in as a different user that does not have access to that program. Create a new project. In that project, create an issue with the body root/secret#1. The rendered body of the issue will now contain a link to the issue URL of the private project.
Guessing namespaces
The issue described above is hard to exploit because there are two unknowns to the attacker: the namespace and the name of the private project. I find an ID enumeration vulnerability in the merge request controller that allows an attacker to dump all namespaces and project names. An attacker can use this endpoint to generate a markdown message that contains all namespaces and project names, appended with #1 in order to extract all external issue tracker URLs.
The ID enumeration vulnerability can be reproduced by creating a new merge request and changing the merge_request[target_project_id] parameter in the URL to reference another project. The returned HTML will contain the name of the namespace and project name of the project associated with that ID. By enumerating all IDs, all project names can be extracted.
The name of the project can be found in the response on line 74 and 75:

Impact
The issue by itself isn't super likely to be exploited, because the attacker doesn't know the namespace and project name. However, by combing the two issues, they become a lot more severe. Both issues should be addressed in order to mitigate the leakage of the private program names and the external issue tracker URL of a 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 cross-link renderer checked access for the internal issue link but not for the external issue tracker URL, and the merge request form echoed project details for any target project ID.
Impact
An attacker could learn the external issue tracker URL of a private project and, by chaining the ID enumeration, discover all namespace and project names, potentially disclosing issues.
What the attacker needed
Victim has a private project with external tracker; attacker has an account on the same instance; attacker can create projects and issues
The fix
Both issues should be addressed: the renderer should not leak external tracker URLs for inaccessible projects, and the merge request form should not reveal project details for arbitrary IDs.
How it was found
- As a victim, create a private project and enable an external issue tracker.
- Sign in as a different user without access to that project and create a new project.
- Create an issue whose body references the private project's issue, then view the rendered body.
- Create a new merge request and change the target project ID parameter to another project's ID.
- Read the returned HTML to obtain that project's namespace and name, then repeat for other IDs.
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 one only its members can see. The site's text formatter still turned a reference like 'project#1' into a link pointing at that private project's external issue tracker, so an outsider learned a URL they should not see. A second flaw let an attacker list every project name by changing a number in a merge request URL.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.