CVE-2024-9264: Grafana SQL Expressions allow for remote code execution
Vulnerability summary
CVE-2024-9264 is a critical (CVSS 9.9) Improper Control of Generation of Code vulnerability in grafana. EPSS estimates a 97.55% chance of exploitation in the next 30 days, higher than 99.9% of scored vulnerabilities. 1 public exploit is recorded.
Weaponized exploit (Metasploit, 17-10-2024)
Source freshness unavailable
How is this decided?Advisory lineage
Upstream 0 · Downstream 8 · Related 11Timeline
- 18-10-2024PublishedVulnerability first disclosed.
- 14-03-2025Last modifiedVulnerability information updated.
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.
CVSS metrics
10 scores · 6 sources · 2 versions- OSV · UbuntuEcosystem advisory · calculated9.4CriticalCVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H
- OSV · GoEcosystem advisory · calculated9.4CriticalCVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
- OSV · ChainguardEcosystem advisory · calculated9.4CriticalCVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H
- NVDNIST9.4CriticalCVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
- OSV · UbuntuEcosystem advisory · calculated8.8HighCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HDiffers
- OSV · GoEcosystem advisory · calculated9.9CriticalCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
- NVDNIST8.8HighCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HDiffers
- OSV · AlpineEcosystem advisory · calculated8.8HighCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HDiffers
EPSS trend
Probability
97.55%
Chance of exploitation in the next 30 days
Percentile
100%
Versus all other CVEs
30-day change
Increase +2.69 pp
From 94.86% on 04-10-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
1 foundGrafana SQL Expressions DuckDB Command Injection
exploit/multi/http/grafana_sql_expressions_rce_cve_2024_9264
Maturity: weaponized
Weaknesses
CWE · root cause- CWE-94Improper Control of Generation of CodeThe product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.
- CWE-77Improper Neutralization of Special Elements used in a CommandThe product constructs all or part of a command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended command when it is sent to a downstream component.
Affected systems
Known conditions: network-reachable, low-privilege account, no user interaction (CVSS vector). Other conditions: not stated in public data.
Chainguard8 products
- grafana-fips-11.6All versions (No fix recorded)
- grafana-fips-12.0< 12.0.10-r6
- grafana-fips-12.1< 12.1.10.01-r3
- grafana-fips-12.2All versions (No fix recorded)
- grafana-fips-12.3All versions (No fix recorded)
Alpine1 product
- grafana< 11.0.7-r0
Github.com/grafana1 product
- grafana≥ 11.0.0, < 11.0.6+security-01 | ≥ 11.1.0, < 11.1.7+security-01 | ≥ 11.2.0, < 11.2.2+security-01 | All versions (No fix recorded)
Grafana1 product
- grafanaEOL≥ 11.0.0, < 11.0.5 | ≥ 11.1.0, < 11.1.6 | ≥ 11.2.0, < 11.2.1 | ≥ 11.0.0, < 11.0.6 | ≥ 11.1.0, < 11.1.7 | ≥ 11.2.0, < 11.2.2 | 11.0.0
Ubuntu1 product
- grafanaAll versions (No fix recorded)
5 vendors · 12 products
References
14 links- github.com/grafana/grafanaPACKAGE