cve.bz

CVE-2022-31097 Cross-site Scripting

8.7 highEPSS 70%Fix available

High (8.7). EPSS 70% 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. Versions on the 8.x and 9.x branch prior to 9.0.3, 8.5.9, 8.4.10, and 8.3.10 are vulnerable to stored cross-site scripting via the Unified Alerting feature of Grafana. An attacker can exploit this vulnerability to escalate privilege from editor to admin by tricking an authenticated admin to click on a link. Versions 9.0.3, 8.5.9, 8.4.10, and 8.3.10 contain a patch. As a workaround, it is possible to disable alerting or use legacy alerting.

Severity

CVSS 3.1

8.7 high
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:N
EPSS
70% (unchanged from 70% a week ago; 70% 30 days ago) estimated probability of exploitation activity in the next 30 days; 99th 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-79 Improper Neutralization of Input During Web Page Generation (Cross-site Scripting)
OWASP Top 10
A05:2025 Injection
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-31097 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2022-31097?via=ask-ai-copy and https://cve.bz/cve/CVE-2022-31097?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-31097 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 8.0.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-vw7q-p2qg-4m5fGogithub.com/grafana/grafana>=9.0.0 <9.0.39.0.3
GHSA-vw7q-p2qg-4m5fGogithub.com/grafana/grafana>=8.5.0 <8.5.98.5.9
GHSA-vw7q-p2qg-4m5fGogithub.com/grafana/grafana>=8.4.0 <8.4.108.4.10
GHSA-vw7q-p2qg-4m5fGogithub.com/grafana/grafana>=8.0.0 <8.3.108.3.10
GO-2024-2857Gogithub.com/grafana/grafanaall versionsno fix published

Linux distributions

DistributionReleasePackageFixed inAdvisory
Ubuntu16.04:LTSgrafanano fix listedUBUNTU-CVE-2022-31097
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.
Alpinev3.16grafana8.5.9-r0ALPINE-CVE-2022-31097
Alpinev3.17, v3.18, v3.19 and 5 moregrafana9.0.3-r0ALPINE-CVE-2022-31097

From the distributions' data via OSV.dev: Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; SUSE security data, CC BY 4.0; the Alpine secdb, CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Ubuntu · SUSE · openSUSE · Alpine.

Red Hat

Red Hat rates this Important.

Red Hat's mitigation

Disable Unified alerting.

https://grafana.com/docs/grafana/latest/setup-grafana/configure-grafana/#unified_alerting

ProductPackageStateAdvisory
Red Hat Ceph Storage 6.1rhceph/rhceph-6-dashboard-rhel9:6-75Fixed 2023-06-15RHSA-2023:3642
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 Ceph Storage 3grafanaAffected
Red Hat Ceph Storage 4rhceph/rhceph-4-dashboard-rhel8Affected
Red Hat Ceph Storage 5rhceph/rhceph-5-dashboard-rhel8Affected
Red Hat Enterprise Linux 8grafanaNot affected
Red Hat Enterprise Linux 9grafanaNot affected
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-31097.

Attack patterns (CAPEC)

  • CAPEC-63 Cross-Site Scripting (XSS) Likelihood: High · Severity: Very High
  • CAPEC-85 AJAX Footprinting Likelihood: High · Severity: Low
  • CAPEC-209 XSS Using MIME Type Mismatch Severity: Medium
  • CAPEC-588 DOM-Based XSS Likelihood: High · Severity: Very High
  • CAPEC-591 Reflected XSS Likelihood: High · Severity: Very High
  • CAPEC-592 Stored XSS Likelihood: High · Severity: Very High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON