Vulnerability · Published Feb 8, 2022 · Assigned by GitHub_M

CVE-2022-21702Cross site scripting in Grafana proxy

Medium 6.5

In plain English

A medium-severity cross-site scripting in grafana from grafana. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 2.3% (higher than 84% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)6.5Medium
Exploit odds (30 days)2.3%top 16.3% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack toolingNoneno public tooling known

Official description

Grafana is an open-source platform for monitoring and observability. In affected versions an attacker could serve HTML content thru the Grafana datasource or plugin proxy and trick a user to visit this HTML page using a specially crafted link and execute a Cross-site Scripting (XSS) attack. The attacker could either compromise an existing datasource for a specific Grafana instance or either set up its own public service and instruct anyone to set it up in their Grafana instance. To be impacted, all of the following must be applicable. For the data source proxy: A Grafana HTTP-based datasource configured with Server as Access Mode and a URL set, the attacker has to be in control of the HTTP server serving the URL of above datasource, and a specially crafted link pointing at the attacker controlled data source must be clicked on by an authenticated user. For the plugin proxy: A Grafana HTTP-based app plugin configured and enabled with a URL set, the attacker has to be in control of the HTTP server serving the URL of above app, and a specially crafted link pointing at the attacker controlled plugin must be clocked on by an authenticated user. For the backend plugin resource: An attacker must be able to navigate an authenticated user to a compromised plugin through a crafted link. Users are advised to update to a patched version. There are no known workarounds for this vulnerability.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
AlmaLinux:8grafana7.5.15-3.el8ALSA-2022:7519
AlmaLinux:9grafana7.5.15-3.el9ALSA-2022:8057
Alpine:v3.20grafana8.3.6-r0ALPINE-CVE-2022-21702
Alpine:v3.21grafana8.3.6-r0ALPINE-CVE-2022-21702
Alpine:v3.22grafana8.3.6-r0ALPINE-CVE-2022-21702
Alpine:v3.23grafana8.3.6-r0ALPINE-CVE-2022-21702
Alpine:v3.24grafana8.3.6-r0ALPINE-CVE-2022-21702
Gogithub.com/grafana/grafana7.5.15GHSA-xc3p-28hw-q24g
Gogithub.com/grafana/grafana8.3.5GHSA-xc3p-28hw-q24g
Rocky Linux:8grafana0:7.5.15-3.el8RLSA-2022:7519
Rocky Linux:9grafana0:7.5.15-3.el9RLSA-2022:8057

Affected products (as reported)

VendorProductVersions
grafana grafana >= 2.0.0-beta1, < 7.5.15>= 8.0.0, < 8.3.5

Weakness: CWE-79 · Vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:L/A:N

References