unathorized access to exposed grafana metrics
The Grafana metrics endpoint on self-hosted GitLab instances remained publicly accessible without authentication, even after hard-coded admin credentials were disabled. An attacker could view internal infrastructure, server load, and thread information.
GitLab
Originally disclosed on GitLab
- Fixed in 3 months
- Disclosed after 3 months
HackerOne report #674146 by d0xing on 2019-08-14, assigned to jritchey:
Summary
hi, recently I read your release notes
https://about.gitlab.com/2019/08/12/critical-security-release-gitlab-12-dot-1-dot-6-released
"Basic authentication and hard-coded admin credentials are now disabled by default in the bundled Grafana instance as part of the Omnibus-based GitLab packages"
"The Grafana dashboard, when accessed using the hard-coded credentials, allowed for a malicious user to view internal resources that are accessible by the host where the GitLab instance resides."
The issue where grafana can be accessed with admin:admin by default has been fixed but all the metrics are still exposed for unauthorized users under the following url/path.
<gitlab_instance_url>/-/grafana/metrics
Best regards,
d0xing
Impact
All self hosted gitlab instances using the new version (12.x) are exposing grafana/gitlab metrics to unauthorized users. An attacker can gain information about the infrastructure, server & http load, threads info and other metrics. Also this seems like an bad endpoint to expose by default publicly.
Security Issue
Security issue on dev.gitlab.org: https://dev.gitlab.org/gitlab/gitlabhq/issues/2942
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 metrics endpoint was not covered by the authentication changes applied to the Grafana dashboard, leaving it publicly reachable by default.
Impact
An attacker could gain information about the infrastructure, server and HTTP load, and thread information, and the endpoint is exposed publicly by default.
What the attacker needed
Self-hosted GitLab 12.x instance; network access to the instance
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.
Grafana is a dashboard tool that shows server statistics. Normally you need to log in to see these statistics, but here anyone could visit a specific web address and see them without logging in. This leaks information about how the server is running, which could help an attacker plan further attacks.
What is Info disclosure?
Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.