VDB

CVE-2022-31107

CVE-2022-31107 PUBLISHED CVSS 7.1 HIGH

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.

PackageEcosystemFixed in
github.com/grafana/grafanaGo Modules9.0.3, 8.5.9, 8.4.10, 8.3.10
grafana-fips-12.0Chainguard12.0.10-r6
grafana-fips-12.1Chainguard12.1.10.01-r3
grafanadhi.docker.com9.0.3, 8.5.9, 8.4.10, 8.3.10
grafana-7Chainguard7.5.28-r0
grafanaAlpine9.0.3-r0, 8.5.9-r0
grafanaBitnami9.0.3, 8.5.9, 8.4.10, 8.3.10
grafanaBitnami9.0.3, 8.5.9, 8.4.10, 8.3.10
grafanaDHI9.0.3, 8.5.9, 8.4.10, 8.3.10

Risk scores

CVSS 3.1
7.1
CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:L

Affected products

VendorProductVersions
grafanagrafana>= 5.3, < 8.3.10, >= 8.4.0, < 8.4.10, >= 8.5.0, < 8.5.9
chainguardgrafana-fips-12.00
chainguardgrafana-fips-12.10
github.comgrafana/grafana5.3.0-beta1, 9.0.0, 8.5.0
chainguardgrafana-fips-11.6*
chainguardgrafana-70
chainguardgrafana-fips-12.3*
alpinegrafana0, 0
grafanagrafana8.4.0, 5.3, 8.5.0
chainguardgrafana-fips-12.2*
chainguardgrafana-fips-13.10
chainguardgrafana-fips-13.0*
chainguardgrafana-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

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›