# CVE-2022-31107: Grafana account takeover via OAuth vulnerability

- Priority: **Routine**
- Reason: Not severe (CVSS 7.1, network access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2022-07-15 · Modified: 2026-01-28
- Aliases: RHSA-2022:5716, RHSA-2022:5717, RHSA-2022:5718, RHSA-2022:5719, RHSA-2022:5720, UBUNTU-CVE-2022-31107, GHSA-mx47-6497-3fv2, BIT-grafana-2022-31107, GO-2024-2852, CGA-23w2-66p9-9hjr, CGA-2w9v-64h7-9wf5, CGA-3h36-v8fq-pmg8, CGA-3pv4-p6g2-jf4g, CGA-3rvq-cpcp-3qc3, CGA-47x8-xgwp-pcqq, CGA-49r2-g3hw-7xmh, CGA-4vfm-q6ch-fhq3, CGA-5h4g-8p82-jw46, CGA-62jw-2995-9p86, CGA-67m9-r4gc-px5x, CGA-6jh6-42fq-gq6x, CGA-6rw7-5j3j-8rcp, CGA-72m9-g9wq-8jvj, CGA-75m3-q3ph-gx7x, CGA-7c42-fmqc-7mw8, CGA-854m-xwwc-993r, CGA-94x2-5fwg-9m74, CGA-95cx-6cgh-m267, CGA-9mpq-g8gr-jr3m, CGA-9vgg-9q3v-h487, CGA-c9f7-fgmq-9xxq, CGA-hhfj-mx25-cfr3, CGA-j3v2-4mjf-x946, CGA-j4m9-4mq6-q67x, CGA-m7c7-3w85-7vwv, CGA-mcm5-q4qp-3wm8, CGA-mg44-2m3p-xc9h, CGA-r34p-jqwr-3636, CGA-r732-x4r5-c9pq, CGA-v7jp-vfv9-98wr, CGA-vg9r-qp55-wx7p, CGA-vgrg-hx9c-9jvm, CGA-vj5h-hh4j-6vfv, CGA-vm2w-9hm2-fpjg, CGA-vmhg-rrq2-rq6p, CGA-wh7h-996f-rm77, CGA-x25m-6m4v-c6p3, CGA-x56c-jq2j-9h9v, CGA-xmhf-xr94-xm2p, ALPINE-CVE-2022-31107
- Record: https://cvemate.com/vulnerability/CVE-2022-31107 · JSON: https://cvemate.com/vulnerability/CVE-2022-31107/json

## Description

```text
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.
```

## Signals

- CVSS: 7.5 high (v3.1, NVD) CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
- EPSS: 2.874%, percentile 87.269%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected (first 20 of 27)

- alpine grafana (Alpine Linux): ≥ 5.3.0, \< 8.5.9-r0 \| ≥ 5.3.0, \< 9.0.3-r0 \| ≥ 8.5.0, \< 8.5.9-r0 \| ≥ 9.0.0, \< 9.0.3-r0
- chainguard grafana-fips-11.6 (Chainguard): All versions (No fix recorded)
- chainguard grafana-fips-12.0 (Chainguard): \< 12.0.10-r6
- chainguard grafana-fips-12.1 (Chainguard): \< 12.1.10.01-r3
- chainguard grafana-fips-12.2 (Chainguard): All versions (No fix recorded)
- chainguard grafana-fips-12.3 (Chainguard): All versions (No fix recorded)
- chainguard grafana-fips-12.4 (Chainguard): All versions (No fix recorded)
- chainguard grafana-fips-13.0 (Chainguard): All versions (No fix recorded)
- chainguard grafana-fips-13.1 (Chainguard): \< 13.1.0-r0
- ubuntu grafana (Ubuntu): All versions (No fix recorded)
- github.com/grafana grafana (Go): ≥ 5.3.0-beta1, \< 8.3.10 \| ≥ 8.4.0, \< 8.4.10 \| ≥ 8.5.0, \< 8.5.9 \| ≥ 9.0.0, \< 9.0.3 \| All versions (No fix recorded)
- grafana grafana: ≥ 5.3, \< 8.3.10 \| ≥ 5.3.0, \< 8.3.10 \| ≥ 8.4.0, \< 8.4.10 \| ≥ 8.5.0, \< 8.5.9 \| ≥ 9.0.0, \< 9.0.3
- netapp e-series\_performance\_analyzer: na
- redhat grafana (Red Hat): \< 0:7.5.11-5.el9\_0 \| \< 0:7.5.11-3.el8\_6 \| \< 0:7.3.6-5.el8\_4 \| \< 0:6.3.6-5.el8\_2 \| \< 0:6.2.2-9.el8\_1
- redhat grafana-azure-monitor (Red Hat): \< 0:6.3.6-5.el8\_2 \| \< 0:6.2.2-9.el8\_1
- redhat grafana-cloudwatch (Red Hat): \< 0:6.3.6-5.el8\_2 \| \< 0:6.2.2-9.el8\_1
- redhat grafana-debuginfo (Red Hat): \< 0:7.5.11-5.el9\_0 \| \< 0:7.5.11-3.el8\_6 \| \< 0:7.3.6-5.el8\_4 \| \< 0:6.3.6-5.el8\_2 \| \< 0:6.2.2-9.el8\_1
- redhat grafana-elasticsearch (Red Hat): \< 0:6.3.6-5.el8\_2 \| \< 0:6.2.2-9.el8\_1
- redhat grafana-graphite (Red Hat): \< 0:6.3.6-5.el8\_2 \| \< 0:6.2.2-9.el8\_1
- redhat grafana-influxdb (Red Hat): \< 0:6.3.6-5.el8\_2 \| \< 0:6.2.2-9.el8\_1

## References (first 20 of 28)

- <https://grafana.com/docs/grafana/next/release-notes/release-notes-8-4-10/>
- <https://github.com/grafana/grafana/security/advisories/GHSA-mx47-6497-3fv2>
- <https://grafana.com/docs/grafana/next/release-notes/release-notes-8-5-9/>
- <https://grafana.com/docs/grafana/next/release-notes/release-notes-9-0-3/>
- <https://security.netapp.com/advisory/ntap-20220901-0010/>
- <https://access.redhat.com/errata/RHSA-2022:5716>
- <https://access.redhat.com/security/updates/classification/#important>
- <https://bugzilla.redhat.com/show_bug.cgi?id=2104367>
- <https://security.access.redhat.com/data/csaf/v2/advisories/2022/rhsa-2022_5716.json>
- <https://access.redhat.com/security/cve/CVE-2022-31107>
- <https://www.cve.org/CVERecord?id=CVE-2022-31107>
- <https://nvd.nist.gov/vuln/detail/CVE-2022-31107>
- <https://access.redhat.com/errata/RHSA-2022:5717>
- <https://security.access.redhat.com/data/csaf/v2/advisories/2022/rhsa-2022_5717.json>
- <https://access.redhat.com/errata/RHSA-2022:5718>
- <https://security.access.redhat.com/data/csaf/v2/advisories/2022/rhsa-2022_5718.json>
- <https://access.redhat.com/errata/RHSA-2022:5719>
- <https://security.access.redhat.com/data/csaf/v2/advisories/2022/rhsa-2022_5719.json>
- <https://access.redhat.com/errata/RHSA-2022:5720>
- <https://security.access.redhat.com/data/csaf/v2/advisories/2022/rhsa-2022_5720.json>

---

Data as of 2026-12-05T08:01:02.174Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
