CVE-2023-0594 Grafana vulnerable to Cross-site Scripting

High 7.3 Published Updated

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.

PackageAffectedFixed in
github.com/grafana/grafana GoFrom 7.0.08.5.21
github.com/grafana/grafana GoFrom 7.0.08.5.21
github.com/grafana/grafana GoFrom 9.0.09.2.13
github.com/grafana/grafana GoFrom 9.0.09.2.13
github.com/grafana/grafana GoFrom 9.3.09.3.8
github.com/grafana/grafana GoFrom 9.3.09.3.8
1 more packages
grafana BitnamiFrom 7.0.08.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.

All Grafana Grafana vulnerabilities

Sources

Also known as BIT-grafana-2023-0594, GHSA-xw5p-hw8j-xg4q, UBUNTU-CVE-2023-0594.

Is CVE-2023-0594 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free