cve.bz

CVE-2022-31107 Incorrect Authorization

7.5 highEPSS 2.9%Fix available

High (7.5). EPSS 2.9% estimated probability of exploitation activity in the next 30 days. Fixed in github.com/grafana/grafana 8.3.10, 8.4.10, 8.5.9.

On this page
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.

Severity

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
EPSS
2.9% (unchanged from 2.9% a week ago; 2.9% 30 days ago) estimated probability of exploitation activity in the next 30 days; 87th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: none · Automatable: no · Technical impact: total, assessed 2026-01-27. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWE
CWE-863 Incorrect Authorization
OWASP Top 10
A01:2025 Broken Access Control
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2022-31107 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2022-31107?via=ask-ai-copy and https://cve.bz/cve/CVE-2022-31107?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2022-31107 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
grafana:grafanafrom 5.3.0 before 8.3.10
grafana:grafanafrom 8.4.0 before 8.4.10
grafana:grafanafrom 8.5.0 before 8.5.9
grafana:grafanafrom 9.0.0 before 9.0.3

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-mx47-6497-3fv2Gogithub.com/grafana/grafana>=5.3.0-beta1 <8.3.108.3.10
GHSA-mx47-6497-3fv2Gogithub.com/grafana/grafana>=8.4.0 <8.4.108.4.10
GHSA-mx47-6497-3fv2Gogithub.com/grafana/grafana>=8.5.0 <8.5.98.5.9
GHSA-mx47-6497-3fv2Gogithub.com/grafana/grafana>=9.0.0 <9.0.39.0.3
GO-2024-2852Gogithub.com/grafana/grafanaall versionsno fix published

Linux distributions

DistributionReleasePackageFixed inAdvisory
Ubuntu16.04:LTSgrafanano fix listedUBUNTU-CVE-2022-31107
Red Hatenterprise_linux:8::appstreamgrafana, grafana-debuginfo0:7.5.11-3.el8_6RHSA-2022:5717
Red Hatenterprise_linux:9::appstreamgrafana, grafana-debuginfo0:7.5.11-5.el9_0RHSA-2022:5716
Red Hatrhel_e4s:8.1::appstreamgrafana, grafana-loki, grafana-mssql and 11 more0:6.2.2-9.el8_1RHSA-2022:5720
Red Hatrhel_eus:8.2::appstreamgrafana, grafana-loki, grafana-mssql and 11 more0:6.3.6-5.el8_2RHSA-2022:5719
Red Hatrhel_eus:8.4::appstreamgrafana, grafana-debuginfo0:7.3.6-5.el8_4RHSA-2022:5718
SUSEEnterprise Storage 6grafana8.5.13-150100.3.12.1SUSE-SU-2022:3676-1
SUSEEnterprise Storage 7, Linux Enterprise High Performance Computing 15 SP1-LTSS, Linux Enterprise High Performance Computing 15 SP2-LTSS and 5 morebind9.16.6-150000.12.65.1SUSE-SU-2023:2578-1
SUSELinux Enterprise High Performance Computing 15-ESPOS, Linux Enterprise High Performance Computing 15-LTSS, Linux Enterprise Server 15-LTSS and 1 moregolang-github-prometheus-node_exporter1.3.0-150000.3.18.1SUSE-SU-2022:3751-1
SUSELinux Enterprise Module for Package Hub 15 SP4grafana8.3.10-150200.3.26.1SUSE-SU-2022:3765-1
SUSELinux Enterprise Module for Package Hub 15 SP4grafana8.5.13-150200.3.29.5SUSE-SU-2022:4428-1
SUSELinux Enterprise Module for Package Hub 15 SP4, Linux Enterprise Module for Package Hub 15 SP5grafana9.5.1-150200.3.41.3SUSE-SU-2023:2575-1
SUSELinux Enterprise Server 12 SP3-BCL, Linux Enterprise Server 12 SP4-LTSS, Linux Enterprise Server 12 SP5 and 5 moregolang-github-prometheus-node_exporter1.3.0-1.21.1SUSE-SU-2022:3747-1
SUSEManager Client Tools 12golang-github-boynux-squid_exporter1.6-1.9.1SUSE-SU-2022:4439-1
SUSEManager Client Tools 12golang-github-lusitaniae-apache_exporter0.11.0-1.13.1SUSE-SU-2022:3747-1
SUSEManager Client Tools 12golang-github-prometheus-alertmanager0.23.0-1.15.2SUSE-SU-2022:3747-1
SUSEManager Client Tools 12grafana8.3.10-1.33.2SUSE-SU-2022:3747-1
SUSEManager Client Tools 12grafana8.5.13-1.36.2SUSE-SU-2022:4439-1
71 more for SUSE in the JSON and on SUSE's page.
openSUSELeap 15.3, Leap 15.4dracut-saltboot0.1.1661440542.6cbe0da-150000.1.38.1SUSE-SU-2022:3751-1
openSUSELeap 15.3, Leap 15.4dracut-saltboot0.1.1665997480.587fa10-150000.1.41.1SUSE-SU-2022:4437-1
openSUSELeap 15.3, Leap 15.4golang-github-boynux-squid_exporter1.6-150000.1.9.1SUSE-SU-2022:4437-1
openSUSELeap 15.3, Leap 15.4golang-github-lusitaniae-apache_exporter0.11.0-150000.1.12.1SUSE-SU-2022:3751-1
openSUSELeap 15.3, Leap 15.4golang-github-prometheus-promu0.13.0-150000.3.9.1SUSE-SU-2022:4437-1
openSUSELeap 15.3, Leap 15.4grafana8.3.10-150200.3.26.1SUSE-SU-2022:3765-1
openSUSELeap 15.3, Leap 15.4grafana8.5.13-150200.3.29.5SUSE-SU-2022:4428-1
openSUSELeap 15.3, Leap 15.4spacecmd4.3.15-150000.3.86.1SUSE-SU-2022:3751-1
openSUSELeap 15.3, Leap 15.4spacecmd4.3.16-150000.3.89.1SUSE-SU-2022:4437-1
openSUSELeap 15.4bind9.16.6-150000.12.65.1SUSE-SU-2023:2578-1
openSUSELeap 15.4prometheus-blackbox_exporter0.19.0-150000.1.14.3SUSE-SU-2022:4437-1
openSUSELeap 15.4wire0.5.0-150000.1.9.3SUSE-SU-2022:4437-1
5 more for openSUSE in the JSON and on openSUSE's page.
AlmaLinux8grafana7.5.11-3.el8_6ALSA-2022:5717
AlmaLinux9grafana7.5.11-5.el9_0ALSA-2022:5716
Rocky Linux8grafana0:7.5.11-3.el8_6RLSA-2022:5717
Rocky Linux9grafana0:7.5.11-5.el9_0RLSA-2022:5716
Alpinev3.16grafana8.5.9-r0ALPINE-CVE-2022-31107
Alpinev3.17, v3.18, v3.19 and 5 moregrafana9.0.3-r0ALPINE-CVE-2022-31107

From the distributions' data via OSV.dev: Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; Red Hat Security Data © Red Hat, Inc., CC BY 4.0; SUSE security data, CC BY 4.0; AlmaLinux's OSV database, MIT; Rocky Linux's errata, BSD-3-Clause; the Alpine secdb, CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Ubuntu · Red Hat · SUSE · openSUSE · Alpine.

Red Hat

Red Hat rates this Important.

Red Hat's mitigation

As a workaround, it is possible to disable any OAuth login or ensure that all users authorized to log in via OAuth have a corresponding user account in Grafana linked to their email address.

ProductPackageStateAdvisory
Red Hat Ceph Storage 6.1rhceph/rhceph-6-dashboard-rhel9:6-75Fixed 2023-06-15RHSA-2023:3642
Red Hat Enterprise Linux 8grafana-0:7.5.11-3.el8_6Fixed 2022-07-26RHSA-2022:5717
Red Hat Enterprise Linux 8.1 Update Services for SAP Solutionsgrafana-0:6.2.2-9.el8_1Fixed 2022-07-26RHSA-2022:5720
Red Hat Enterprise Linux 8.2 Extended Update Supportgrafana-0:6.3.6-5.el8_2Fixed 2022-07-26RHSA-2022:5719
Red Hat Enterprise Linux 8.4 Extended Update Supportgrafana-0:7.3.6-5.el8_4Fixed 2022-07-26RHSA-2022:5718
Red Hat Enterprise Linux 9grafana-0:7.5.11-5.el9_0Fixed 2022-07-26RHSA-2022:5716
OpenShift Service Mesh 2.0servicemesh-grafanaAffected
OpenShift Service Mesh 2.1servicemesh-grafanaAffected
Red Hat Advanced Cluster Management for Kubernetes 2rhacm2/acm-grafana-rhel8Not affected
Red Hat build of QuarkusgrafanaNot affected
Red Hat Ceph Storage 3grafanaAffected
Red Hat Ceph Storage 4rhceph/rhceph-4-dashboard-rhel8Affected
Red Hat Ceph Storage 5rhceph/rhceph-5-dashboard-rhel8Affected
Red Hat OpenShift Container Platform 4openshift4/ose-grafanaNot affected
Red Hat Storage 3grafanaAffected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2022-31107.

References

Check your stackJSON