CVE-2023-0507 Grafana vulnerable to Cross-site Scripting
An Editor user can inject JavaScript via map attributions to execute code in an Admin's session, enabling privilege escalation and account takeover.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2023-0507?
CVE-2023-0507 is a high-severity cross-site scripting vulnerability in Grafana Grafana, published on 1 Mar 2023. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.
Official description
Grafana is an open-source platform for monitoring and observability.
Starting with the 8.1 branch, Grafana had a stored XSS vulnerability affecting the core plugin GeoMap.
The stored XSS vulnerability was possible due to map attributions weren't properly sanitized and allowed arbitrary JavaScript to be executed in the context of the currently authorized user of the Grafana instance.
An attacker needs to have the Editor role in order to change a panel to include a map attribution containing JavaScript.
This means that vertical privilege escalation is possible, where a user with Editor role can change to a known password for a user having Admin role if the user with Admin role executes malicious JavaScript viewing a dashboard.
Users may upgrade to version 8.5.21, 9.2.13 and 9.3.8 to receive a fix.
Weakness: CWE-79
Which versions are affected by CVE-2023-0507?
7 open source packages ship an affected version, including github.com/grafana/grafana and grafana. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
github.com/grafana/grafana Go | From 8.1.0 | 8.5.21 |
github.com/grafana/grafana Go | From 8.1.0 | 8.5.21 |
github.com/grafana/grafana Go | From 9.0.0 | 9.2.13 |
github.com/grafana/grafana Go | From 9.0.0 | 9.2.13 |
github.com/grafana/grafana Go | From 9.3.0 | 9.3.8 |
github.com/grafana/grafana Go | From 9.3.0 | 9.3.8 |
1 more packages
grafana Bitnami | From 8.1.0 | 8.5.21, 9.2.13, 9.3.8 |
Products include Grafana Grafana.
How do I fix CVE-2023-0507?
Upgrade github.com/grafana/grafana to a fixed version for your release line: 8.5.21, 9.2.13 or 9.3.8.
Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.
Is CVE-2023-0507 being exploited?
There is no known exploitation of CVE-2023-0507 in the wild and no public exploit code.
Other vulnerabilities in Grafana Grafana
Sources
Also known as BIT-grafana-2023-0507, CLSA-2026-1781274708, GHSA-hjv9-hm2f-rpcj, UBUNTU-CVE-2023-0507.