CVEfocus › CVE database › CVE-2022-31097

CVE-2022-31097Stored XSS in Grafana's Unified Alerting

CVSS 7.3 HighEPSS 1.6% (higher than 76% of CVEs)Published 2022-07-15Updated 2026-01-28Assigner: GitHub_M

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.

CWE-79

What to do

Fixed builds are available from Alpine, Go: see the table below for the fixed version per release.

Ubuntu has not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

10Fixed
1Fix pending
16Not affected

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 16.04grafanaFix pendingUBUNTU-CVE-2022-31097
Red Hat Enterprise Linux 9grafanaNot affected
Red Hat Enterprise Linux 9grafana-selinuxNot affected
Red Hat Enterprise Linux 8grafanaNot affected
Red Hat Enterprise Linux 8grafana-azure-monitorNot affected
Red Hat Enterprise Linux 8grafana-cloudwatchNot affected
Red Hat Enterprise Linux 8grafana-elasticsearchNot affected
Red Hat Enterprise Linux 8grafana-graphiteNot affected
Red Hat Enterprise Linux 8grafana-influxdbNot affected
Red Hat Enterprise Linux 8grafana-lokiNot affected
Red Hat Enterprise Linux 8grafana-mssqlNot affected
Red Hat Enterprise Linux 8grafana-mysqlNot affected
Red Hat Enterprise Linux 8grafana-opentsdbNot affected
Red Hat Enterprise Linux 8grafana-postgresNot affected
Red Hat Enterprise Linux 8grafana-prometheusNot affected
Red Hat Enterprise Linux 8grafana-selinuxNot affected
Red Hat Enterprise Linux 8grafana-stackdriverNot affected
Alpine Linux 3.24grafanaFixed9.0.3-r0ALPINE-CVE-2022-31097
Alpine Linux 3.23grafanaFixed9.0.3-r0ALPINE-CVE-2022-31097
Alpine Linux 3.22grafanaFixed9.0.3-r0ALPINE-CVE-2022-31097
Alpine Linux 3.21grafanaFixed9.0.3-r0ALPINE-CVE-2022-31097
Alpine Linux 3.20grafanaFixed9.0.3-r0ALPINE-CVE-2022-31097
Alpine Linux 3.19grafanaFixed9.0.3-r0ALPINE-CVE-2022-31097
Alpine Linux 3.18grafanaFixed9.0.3-r0ALPINE-CVE-2022-31097
Alpine Linux 3.17grafanaFixed9.0.3-r0ALPINE-CVE-2022-31097
Alpine Linux 3.16grafanaFixed8.5.9-r0ALPINE-CVE-2022-31097
Go librarygithub.com/grafana/grafanaFixed8.3.10GHSA-vw7q-p2qg-4m5f

What the vendor says

As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.