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

- Severity: High 7.1 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:L`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 2.87%, higher than 87% of CVEs (2026-12-01)
- Published: 2022-07-15T12:30:14.000Z
- Modified: 2026-09-10T03:49:18.739Z
- Also known as: GHSA-mx47-6497-3fv2, BIT-GRAFANA-2022-31107, GO-2024-2852
- Related: CGA-3mgc-jrh8-2rmq
- Weaknesses: CWE-863
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- grafana grafana: >= 5.3, < 8.3.10; >= 8.4.0, < 8.4.10; >= 8.5.0, < 8.5.9; >= 9.0.0, < 9.0.3; from 5.3.0 before 8.3.10; from 8.4.0 before 8.4.10; from 8.5.0 before 8.5.9; from 9.0.0 before 9.0.3
- github.com/grafana/grafana (Go): from 5.3.0-beta1 before 8.3.10; from 8.4.0 before 8.4.10; from 8.5.0 before 8.5.9; from 9.0.0 before 9.0.3; all versions
- netapp e-series_performance_analyzer: no versions given
- grafana (Bitnami): from 5.3.0 before 8.3.10; from 8.4.0 before 8.4.10; from 8.5.0 before 8.5.9; from 9.0.0 before 9.0.3

## Every score

- GitHub_M: CVSS:3.1 7.1 High `CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:L`
- GitHub: CVSS:3.1 7.1 High `CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:L`
- GitHub: CVSS:4.0 High `CVSS:4.0/AV:N/AC:H/AT:P/PR:L/UI:N/VC:H/VI:H/VA:L/SC:N/SI:N/SA:N`
- NVD: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Bitnami Vulnerability Database: rating High

## References

- <https://grafana.com/docs/grafana/next/release-notes/release-notes-8-4-10/> (advisory, release-notes, vendor-advisory)
- <https://github.com/grafana/grafana/security/advisories/GHSA-mx47-6497-3fv2> (advisory, release-notes, third-party-advisory, web)
- <https://grafana.com/docs/grafana/next/release-notes/release-notes-8-5-9/> (advisory, release-notes, vendor-advisory)
- <https://grafana.com/docs/grafana/next/release-notes/release-notes-9-0-3/> (advisory, release-notes, vendor-advisory)
- <https://security.netapp.com/advisory/ntap-20220901-0010/> (advisory, third-party-advisory)
- <https://nvd.nist.gov/vuln/detail/CVE-2022-31107> (advisory, web)
- <https://github.com/grafana/grafana> (package)
- <https://grafana.com/docs/grafana/next/release-notes/release-notes-8-4-10> (web)
- <https://grafana.com/docs/grafana/next/release-notes/release-notes-8-5-9> (web)
- <https://grafana.com/docs/grafana/next/release-notes/release-notes-9-0-3> (web)
- <https://security.netapp.com/advisory/ntap-20220901-0010> (web)

## Sources

- CVE List: [CVE-2022-31107](https://www.cve.org/CVERecord?id=CVE-2022-31107), CVE Terms of Use, modified 2026-01-28
- GitHub Advisory Database: [GHSA-mx47-6497-3fv2](https://github.com/advisories/GHSA-mx47-6497-3fv2), CC-BY-4.0, modified 2026-09-10
- Go Vulnerability Database: [GO-2024-2852](https://pkg.go.dev/vuln/GO-2024-2852), CC-BY-4.0, modified 2026-02-04
- NVD: [CVE-2022-31107](https://nvd.nist.gov/vuln/detail/CVE-2022-31107), Public domain, modified 2026-06-17
- Bitnami Vulnerability Database: [BIT-GRAFANA-2022-31107](https://osv.dev/vulnerability/BIT-GRAFANA-2022-31107), Apache-2.0, modified 2026-09-08

---

Page: https://cve.day/CVE-2022-31107 · Whole record: https://cve.day/CVE-2022-31107.json · Rebuilt by cve.day 2026-11-25T22:58:12.965Z
