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.
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
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| AlmaLinux:8 | grafana | 7.5.15-3.el8 | ALSA-2022:7519 |
| AlmaLinux:9 | grafana | 7.5.15-3.el9 | ALSA-2022:8057 |
| Alpine:v3.20 | grafana | 8.3.6-r0 | ALPINE-CVE-2022-21702 |
| Alpine:v3.21 | grafana | 8.3.6-r0 | ALPINE-CVE-2022-21702 |
| Alpine:v3.22 | grafana | 8.3.6-r0 | ALPINE-CVE-2022-21702 |
| Alpine:v3.23 | grafana | 8.3.6-r0 | ALPINE-CVE-2022-21702 |
| Alpine:v3.24 | grafana | 8.3.6-r0 | ALPINE-CVE-2022-21702 |
| Go | github.com/grafana/grafana | 7.5.15 | GHSA-xc3p-28hw-q24g |
| Go | github.com/grafana/grafana | 8.3.5 | GHSA-xc3p-28hw-q24g |
| Rocky Linux:8 | grafana | 0:7.5.15-3.el8 | RLSA-2022:7519 |
| Rocky Linux:9 | grafana | 0:7.5.15-3.el9 | RLSA-2022:8057 |
Affected products (as reported)
Weakness: CWE-79 · Vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:H/I:L/A:N
References
- https://github.com/grafana/grafana/security/advisories/GHSA-xc3p-28hw-q24g x_refsource_CONFIRM
- https://github.com/grafana/grafana/commit/27726868b3d7c613844b55cd209ca93645c99b85 x_refsource_MISC
- https://grafana.com/blog/2022/02/08/grafana-7.5.15-and-8.3.5-released-with-moderate-severity-security-fixes/ x_refsource_MISC
- https://security.netapp.com/advisory/ntap-20220303-0005/ x_refsource_CONFIRM
- FEDORA-2022-83405f9d5b vendor-advisory, x_refsource_FEDORA
- FEDORA-2022-9dd03cab55 vendor-advisory, x_refsource_FEDORA
- FEDORA-2022-c5383675d9 vendor-advisory, x_refsource_FEDORA