Grafana Datasource and Plugin Proxy XSS
CVE-2022-21702 is a cross-site scripting vulnerability in Grafana datasource-proxy, plugin-proxy, and backend-plugin resource handling. An attacker controlling a configured datasource, an enabled HTTP-based app plugin, its associated HTTP service, or a compromised plugin can cause Grafana proxy functionality to serve attacker-controlled HTML. If an authenticated Grafana user follows a crafted link to that proxied content, attacker-supplied script can execute in the user’s Grafana context. A compromised datasource may also be abused to gain inappropriate access to other datasources in the same Grafana organization.
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
What an attacker gets, and what they’ve been doing with it.
Successful exploitation executes cross-site scripting payloads in the context of an authenticated Grafana user. This may enable inappropriate access to other datasources connected to the same Grafana organization.
If you can’t patch tonight, do this now.
No complete workaround is known. Until Grafana can be upgraded, configure an intermediary proxy to return a Content-Security-Policy: sandbox response header for datasource-proxy, plugin-proxy, plugin-resource, and datasource-resource proxy routes. Alternatively, configure those responses with a Content-Disposition attachment header to prevent inline rendering.
Patch, then assume compromise.
Upgrade Grafana to a fixed release. The identified fixed versions are Grafana 7.5.15 and 8.3.5. For Red Hat Enterprise Linux deployments, apply the corrected Grafana package updates supplied through the applicable Red Hat security advisories.
No public exploits tracked yet. Mallory keeps watching.
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
6 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.