CVE-2023-0594 Grafana vulnerable to Cross-site Scripting
An Editor can inject JavaScript into trace views, leading to privilege escalation and account takeover when an Admin views the dashboard.
- 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-0594?
CVE-2023-0594 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 7.0 branch, Grafana had a stored XSS vulnerability in the trace view visualization.
The stored XSS vulnerability was possible due the value of a span's attributes/resources were not properly sanitized and this will be rendered when the span's attributes/resources are expanded.
An attacker needs to have the Editor role in order to change the value of a trace view visualization to contain 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-0594?
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 7.0.0 | 8.5.21 |
github.com/grafana/grafana Go | From 7.0.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 7.0.0 | 8.5.21, 9.2.13, 9.3.8 |
Products include Grafana Grafana.
How do I fix CVE-2023-0594?
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-0594 being exploited?
There is no known exploitation of CVE-2023-0594 in the wild and no public exploit code.
Other vulnerabilities in Grafana Grafana
Sources
Also known as BIT-grafana-2023-0594, GHSA-xw5p-hw8j-xg4q, UBUNTU-CVE-2023-0594.