Unauthorized (Non-member) Users Can View Issue Templates via WorkItemDescriptionTemplates Graghql query
A new GraphQL field for work item description templates did not enforce project visibility restrictions, allowing any non-member to read issue templates from a public project where Issues and Repository were restricted to project members only. An attacker could access potentially sensitive information contained in those templates.
GitLab
Originally disclosed on GitLab
- Fixed in 5 months
- Disclosed after 5 months
⚠️ Please read the process on how to fix security issues before starting to work on the issue. Vulnerabilities must be fixed in a security mirror.
HackerOne report #2932066 by yuki_osaki on 2025-01-11, assigned to @ngeorge1:
Report | Attachments | How To Reproduce
Report
Gitlab recently add WorkItemDescriptionTemplates Graghql query https://gitlab.com/gitlab-org/gitlab/-/merge_requests/175061
In a GitLab project set to Public visibility, with Issues restricted to “Project Members Only” and the Repository also restricted to “Project Members Only,” it was discovered that Issue Templates (.gitlab/issue_templates/*.md) can still be accessed by users who are not members of the project. Access is possible through the WorkItemDescriptionTemplates GraphQL field. This poses a risk of exposing potentially sensitive information contained in these templates to individuals who should not have access.
Related Prior Vulnerability
• GitLab previously treated a similar issue—“Guests can disclose project templates”—as a security concern, noted in Issue https://gitlab.com/gitlab-org/gitlab/-/issues/462108
and addressed in the GitLab 17.4.2 Security Release (October 9, 2024).
• That previous report involved a user with a Guest role. In the scenario described here, no specific role is needed—any non-member account can retrieve the templates via this new field.
• Because this WorkItemDescriptionTemplates feature is new, this appears to be a distinct vulnerability rather than a continuation or incomplete fix of the older issue.
Steps to Reproduce
1. Project Setup
* Create or use an existing GitLab project.
* Set the project’s visibility to Public.
* Under Settings → General → Permissions, features, and visibility:
• Set “Issues” to Only Project Members (or a higher role like Developer).
• Set “Repository” to Only Project Members (or a higher role like Developer).
* In the .gitlab/issue_templates directory, place one or more Issue Template files (e.g., *.md) containing any relevant or sensitive content.
2. Attempt to Access as a Non-member
* Log in with an account that is not a member of this project, or simply use an account that has no membership in the project.
* run query in https://gitlab.com/-/graphql-explorer
query {
namespace(fullPath:"REPLACEME") {
workItemDescriptionTemplates(name: "REPLACEME") {
nodes {
name
content
}
}
}
}
- .confirm you can read issue templates
Expected Behavior
When a project’s Issues and Repository are restricted to Project Members Only, the .gitlab/issue_templates/*.md files should also be hidden from anyone who is not a member.
This happens on gitlab.com
Since this feature is new, please test it on GitLab.com
Impact
- Issue templates can be exposed to users who are not intended to access it. Templates often contain sensitive info about processes, internal links, or contact points
- Even though the project is set to Public, the Issues and Repository are configured to be accessible only by project members. This should, under normal circumstances, prevent external or non-member users from seeing any content within .gitlab/issue_templates.
- By exploiting this gap in access control, unauthorized (non-member) users can inadvertently gain knowledge of internal processes, confidential project details, or other private information.
Attachments
Warning: Attachments received through HackerOne, please exercise caution!
How To Reproduce
Please add reproducibility information to this section:
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 new GraphQL field did not check the project's feature visibility settings before returning template content.
Impact
Non-member users could read issue templates that may contain sensitive process details, internal links, or contact points, even when Issues and Repository were restricted to project members only.
What the attacker needed
A GitLab account; target project is public; Issues and Repository set to members only; issue templates exist in the project
How it was found
- Create or use a public GitLab project and set Issues and Repository to 'Only Project Members'.
- Place issue template files in the .gitlab/issue_templates directory.
- Log in as a user who is not a member of the project.
- Run a GraphQL query against the namespace's workItemDescriptionTemplates field.
- Confirm that the template content is returned.
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 project can be public while its issues and code are restricted to members only. A new feature let anyone query issue templates through an API without checking if they were allowed to see them. This meant outsiders could read internal notes meant only for team members.
What is Access control?
A user can do something their role should not allow: reach an admin function, act on a feature they have not paid for, or skip a permission check. IDOR is the special case where the object belongs to someone else.