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.
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
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Alpine:v3.20 | grafana | 11.0.7-r0 | ALPINE-CVE-2024-9264 |
| Go | github.com/grafana/grafana | 11.0.6+security-01 | GHSA-q99m-qcv4-fpm7 |
| Go | github.com/grafana/grafana | 11.1.7+security-01 | GHSA-q99m-qcv4-fpm7 |
| Go | github.com/grafana/grafana | 11.2.2+security-01 | GHSA-q99m-qcv4-fpm7 |
| Go | github.com/grafana/grafana | no fix listed | GO-2024-3215 |
Affected products (as reported)
Weakness: CWE-94 · Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H