Vulnerability · Published Oct 18, 2024 · Assigned by GRAFANA

CVE-2024-9264Grafana SQL Expressions allow for remote code execution

Critical 9.9

In plain English

A critical-severity code injection in Grafana from Grafana. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 97.6% (higher than 99.9% of all known vulnerabilities). Ready-made attack tooling exists: Metasploit, Nuclei, public proof-of-concept code. Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)9.9Critical
Exploit odds (30 days)97.6%top 0.1% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack tooling3Metasploit, Nuclei, Public PoC

Official description

The SQL Expressions experimental feature of Grafana allows for the evaluation of `duckdb` queries containing user input. These queries are insufficiently sanitized before being passed to `duckdb`, leading to a command injection and local file inclusion vulnerability. Any user with the VIEWER or higher permission is capable of executing this attack. The `duckdb` binary must be present in Grafana's $PATH for this attack to function; by default, this binary is not installed in Grafana distributions.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Alpine:v3.20grafana11.0.7-r0ALPINE-CVE-2024-9264
Gogithub.com/grafana/grafana11.0.6+security-01GHSA-q99m-qcv4-fpm7
Gogithub.com/grafana/grafana11.1.7+security-01GHSA-q99m-qcv4-fpm7
Gogithub.com/grafana/grafana11.2.2+security-01GHSA-q99m-qcv4-fpm7
Gogithub.com/grafana/grafanano fix listedGO-2024-3215

Affected products (as reported)

VendorProductVersions
Grafana Grafana 11.0.0 – before 11.0.511.1.0 – before 11.1.611.2.0 – before 11.2.111.0.0 – before 11.0.611.1.0 – before 11.1.711.2.0 – before 11.2.2

Weakness: CWE-94 · Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H

References