CVE-2022-31107
Grafana account takeover via OAuth vulnerability
Reported by github_m · Published July 15, 2022
github.com/grafana/grafana is fixed in 9.0.3, 8.5.9, 8.4.10 and 1 more (Go Modules)
Grafana 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.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| github.com/grafana/grafana | Go Modules | 9.0.3, 8.5.9, 8.4.10, 8.3.10 |
| grafana-fips-12.0 | Chainguard | 12.0.10-r6 |
| grafana-fips-12.1 | Chainguard | 12.1.10.01-r3 |
| grafana | dhi.docker.com | 9.0.3, 8.5.9, 8.4.10, 8.3.10 |
| grafana-7 | Chainguard | 7.5.28-r0 |
| grafana | Alpine | 9.0.3-r0, 8.5.9-r0 |
| grafana | Bitnami | 9.0.3, 8.5.9, 8.4.10, 8.3.10 |
| grafana | Bitnami | 9.0.3, 8.5.9, 8.4.10, 8.3.10 |
| grafana | DHI | 9.0.3, 8.5.9, 8.4.10, 8.3.10 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| grafana | grafana | >= 5.3, < 8.3.10, >= 8.4.0, < 8.4.10, >= 8.5.0, < 8.5.9 |
| chainguard | grafana-fips-12.0 | 0 |
| chainguard | grafana-fips-12.1 | 0 |
| github.com | grafana/grafana | 5.3.0-beta1, 9.0.0, 8.5.0 |
| chainguard | grafana-fips-11.6 | * |
| chainguard | grafana-7 | 0 |
| chainguard | grafana-fips-12.3 | * |
| alpine | grafana | 0, 0 |
| grafana | grafana | 8.4.0, 5.3, 8.5.0 |
| chainguard | grafana-fips-12.2 | * |
| chainguard | grafana-fips-13.1 | 0 |
| chainguard | grafana-fips-13.0 | * |
| chainguard | grafana-fips-12.4 | * |
Timeline
- Jul 14, 2022 CVE Published
- Jul 16, 2022 EPSS Score (30 in total, the first dated here)
- Jan 16, 2026 CVE Updated
- Mar 11, 2026 Security Advisory (8 in total, the first dated here)
- Mar 17, 2026 Distribution Patch (7 in total, the first dated here)
- Jun 25, 2026 Coalition ESS Score
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2022-31107
vulnetix vdb fixes CVE-2022-31107
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2022-31107/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart
References
- x_refsource_MISC
- x_refsource_CONFIRM
- x_refsource_MISC
- x_refsource_MISC
- x_refsource_CONFIRM
- https://nvd.nist.gov/vuln/detail/CVE-2022-31107 advisory
- https://github.com/advisories/GHSA-mx47-6497-3fv2 advisory
- https://github.com/grafana/grafana url
- https://grafana.com/docs/grafana/next/release-notes/release-notes-8-4-10 url
- https://grafana.com/docs/grafana/next/release-notes/release-notes-8-5-9 url
- https://grafana.com/docs/grafana/next/release-notes/release-notes-9-0-3 url
- https://security.netapp.com/advisory/ntap-20220901-0010 advisory