CVE-2022-21702Cross site scripting in Grafana proxy
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.
What to do
Fixed builds are available from AlmaLinux, Alpine, Go, Red Hat, Rocky Linux: 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
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.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 16.04 | grafana | Fix pending | UBUNTU-CVE-2022-21702 | |
| Red Hat Enterprise Linux 9 | grafana | Fixed | 0:7.5.15-3.el9 | RHSA-2022:8057 |
| Red Hat Enterprise Linux 8 | grafana | Fixed | 0:7.5.15-3.el8 | RHSA-2022:7519 |
| AlmaLinux 9 | grafana | Fixed | 7.5.15-3.el9 | ALSA-2022:8057 |
| AlmaLinux 8 | grafana | Fixed | 7.5.15-3.el8 | ALSA-2022:7519 |
| Rocky Linux 9 | grafana | Fixed | 0:7.5.15-3.el9 | RLSA-2022:8057 |
| Rocky Linux 8 | grafana | Fixed | 0:7.5.15-3.el8 | RLSA-2022:7519 |
| Alpine Linux 3.24 | grafana | Fixed | 8.3.6-r0 | ALPINE-CVE-2022-21702 |
| Alpine Linux 3.23 | grafana | Fixed | 8.3.6-r0 | ALPINE-CVE-2022-21702 |
| Alpine Linux 3.22 | grafana | Fixed | 8.3.6-r0 | ALPINE-CVE-2022-21702 |
| Alpine Linux 3.21 | grafana | Fixed | 8.3.6-r0 | ALPINE-CVE-2022-21702 |
| Alpine Linux 3.20 | grafana | Fixed | 8.3.6-r0 | ALPINE-CVE-2022-21702 |
| Alpine Linux 3.19 | grafana | Fixed | 8.3.6-r0 | ALPINE-CVE-2022-21702 |
| Alpine Linux 3.18 | grafana | Fixed | 8.3.6-r0 | ALPINE-CVE-2022-21702 |
| Alpine Linux 3.17 | grafana | Fixed | 8.3.6-r0 | ALPINE-CVE-2022-21702 |
| Alpine Linux 3.16 | grafana | Fixed | 8.3.6-r0 | ALPINE-CVE-2022-21702 |
| Go library | github.com/grafana/grafana | Fixed | 7.5.15 | GHSA-xc3p-28hw-q24g |
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.
- grafana: affected: >= 2.0.0-beta1, < 7.5.15, >= 8.0.0, < 8.3.5
Vendor advisories:
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/… (vendor-advisory)
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/… (vendor-advisory)
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/… (vendor-advisory)
References
- https://github.com/grafana/grafana/security/advisories/GHSA-xc3p-28hw-q24g
- https://github.com/grafana/grafana/commit/27726868b3d7c613844b55cd209ca93645c99b85
- https://grafana.com/blog/2022/02/08/grafana-7.5.15-and-8.3.5-released-with-moderate-severity-security-fixes/
- https://security.netapp.com/advisory/ntap-20220303-0005/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/HLAQRRGNSO5MYCPAXGPH2OCSHOGHSQMQ/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/2PFW6Q2LXXWTFRTMTRN4ZGADFRQPKJ3D/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/36GUEPA5TPSC57DZTPYPBL6T7UPQ2FRH/
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.