CVE-2020-24303 Grafana XSS via a query alias for the ElasticSearch datasource

Medium 6.1 Published Updated

Attackers can execute arbitrary scripts in Grafana via malicious ElasticSearch query aliases, potentially compromising user sessions.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2020-24303?

CVE-2020-24303 is a medium-severity cross-site scripting vulnerability in Grafana Grafana, published on 28 Oct 2020. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

Official description

Grafana before 7.1.0-beta 1 allows XSS via a query alias for the ElasticSearch datasource.

Weakness: CWE-79

Which versions are affected by CVE-2020-24303?

4 open source packages ship an affected version, including github.com/grafana/grafana and grafana. It affects 1 product.

PackageAffectedFixed in
github.com/grafana/grafana GoAll versionsNone
github.com/grafana/grafana GoAll versions7.1.0-beta1
github.com/grafana/grafana GoAll versions7.1.0-beta1
grafana BitnamiAll versions7.0.6

Products include Grafana Grafana.

How do I fix CVE-2020-24303?

Upgrade github.com/grafana/grafana to 7.1.0-beta1 or later.

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-2020-24303 being exploited?

There is no known exploitation of CVE-2020-24303 in the wild and no public exploit code.

All Grafana Grafana vulnerabilities

Sources

Also known as BIT-grafana-2020-24303, GHSA-mvpr-q6rh-8vrp, GO-2024-2520, MINI-5jwr-rw7q-jq6f, MINI-5p7p-rrxj-wcg2, MINI-7ggr-cmr7-94x5 and 15 more.

Is CVE-2020-24303 in your software?

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

Check your SBOMs for free