Grafana account takeover via OAuth vulnerability
grafana
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| github.com/grafana/grafana Go |
|
|
grafana
| Product | Affected | Fixed in |
|---|---|---|
| github.com/grafana/grafana Go |
|
|
9.0.3Grafana is an open-source platform for monitoring and observability. In versions 5.3 until 9.0.3, 8.5.9, 8.4.10, and 8.3.10, it is possible for a malicious user who has authorization to log into a Grafana instance via a configured OAuth IdP which provides a login name to take over the account of another user in that Grafana instance. This can occur when the malicious user is authorized to log in to Grafana via OAuth, the malicious user's external user id is not already associated with an account in Grafana, the malicious user's email address is not already associated with an account in Grafana, and the malicious user knows the Grafana username of the target user. If these conditions are met, the malicious user can set their username in the OAuth provider to that of the target user, then go through the OAuth flow to log in to Grafana. Due to the way that external and internal user accounts are linked together during login, if the conditions above are all met then the malicious user will be able to log in to the target user's Grafana account. Versions 9.0.3, 8.5.9, 8.4.10, and 8.3.10 contain a patch for this issue. As a workaround, concerned users can disable OAuth login to their Grafana instance, or ensure that all users authorized to log in via OAuth have a corresponding user account in Grafana linked to their email address.
From the CVE record · GitHub_M
Grafana’s OAuth login can incorrectly link an external identity to another user’s account. An attacker authorized to log in through a configured OAuth provider can take over a target account if the provider supplies a login name, the attacker knows the target’s Grafana username, and the attacker’s external ID and email are not already associated with Grafana accounts.
Check Grafana installations using the Go package github.com/grafana/grafana in versions >=5.3.0-beta1 <8.3.10, >=8.4.0 <8.4.10, >=8.5.0 <8.5.9, or >=9.0.0 <9.0.3.