Grafana SQL Expressions allow for remote code execution
Published Oct 18, 2024
9.4
CRITICALCVSS 4.0
EPSS 94.86%
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 products
-
- Version 11.0.0StatusaffectedConstraints<11.0.5
- Version 11.0.0StatusaffectedConstraints<11.0.6
- Version 11.1.0StatusaffectedConstraints<11.1.6
- Version 11.1.0StatusaffectedConstraints<11.1.7
- Version 11.2.0StatusaffectedConstraints<11.2.1
- Version 11.2.0StatusaffectedConstraints<11.2.2
- Version
Default status is the baseline for the product, each version can override it (e.g. patched versions marked unaffected).
-
- Version 11.0.0StatusaffectedConstraints<11.0.5\+security-01
- Version 11.0.6StatusaffectedConstraints<11.0.6\+security-01
- Version 11.1.0StatusaffectedConstraints<11.1.6\+security-01
- Version 11.1.7StatusaffectedConstraints<11.1.7\+security-01
- Version 11.2.0StatusaffectedConstraints<11.2.1\+security-01
- Version 11.2.2StatusaffectedConstraints<11.2.2\+security-01
- Version
Default status is the baseline for the product, each version can override it (e.g. patched versions marked unaffected).
Red Hat Enterprise Linux 10
grafana
Not affected
Red Hat Enterprise Linux 8
grafana
Not affected
Red Hat Enterprise Linux 9
grafana
Not affected
Red Hat Storage 3
grafana
Not affected
| Product | Package | State | Advisory |
|---|---|---|---|
| Red Hat Enterprise Linux 10 | grafana | Not affected | n/a |
| Red Hat Enterprise Linux 8 | grafana | Not affected | n/a |
| Red Hat Enterprise Linux 9 | grafana | Not affected | n/a |
| Red Hat Storage 3 | grafana | Not affected | n/a |
github.com/grafana/grafana
Go
Introduced 0 Fixed not fixed
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Go | github.com/grafana/grafana | 0 | not fixed |
Remediation
Red Hat statement
This vulnerability is classified as critical instead of important because it allows for command injection and local file inclusion, potentially leading to arbitrary code execution or unauthorized access to sensitive files. The exploit can be carried out by any user with VIEWER or higher permissions, significantly increasing the attack surface. Moreover, due to an incorrect implementation of feature flags, the SQL Expressions feature is enabled by default for the API, making it more likely to be exposed in affected deployments. Although the vulnerability requires the presence of the DuckDB binary in the Grafana process's PATH, systems that meet this condition are at significant risk. It’s important to note that this issue was introduced in a Grafana version not included in any Red Hat offerings, ensuring that Red Hat customers are not impacted.
Red Hat mitigation
Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.
Metrics
CVSS: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
1 other source (CVE.org) ▾
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
1 other source (GHSA) ▾
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
No CVSS v3.0 score for this CVE.
No CVSS v2.0 score for this CVE.
This CVE is not in the KEV list.
CISA SSVC (Vulnrichment)
Stakeholder-Specific Vulnerability Categorization from CISA ADP.
Exploitation
NoneAutomatable
NoTechnical Impact
TotalDecision
n/aAssessed Oct 18, 2024 · SSVC 2.0.3
Estimated probability of exploitation in the wild in the next 30 days (FIRST EPSS). As of Oct 3, 2026.
Score over time
2024–2026- EPSS v3
- EPSS v4
- EPSS v5
Percentile over time
- EPSS v3
- EPSS v4
- EPSS v5
Table of values (18 key points)
Flat stretches are collapsed; showing up to 120 newest points.
| Date | Score | Percentile | Model |
|---|---|---|---|
| Oct 3, 2026 | 94.86% (0.94864) | 99.86th | v5 (v2026.06.15) |
| Jul 25, 2026 | 94.64% (0.94644) | 99.85th | v5 (v2026.06.15) |
| Jun 15, 2026 | 97.65% (0.97648) | 99.89th | v5 (v2026.06.15) |
| Nov 26, 2025 | 93.87% (0.93869) | 99.86th | v4 (v2025.03.14) |
| Nov 21, 2025 | 92.29% (0.92294) | 99.70th | v4 (v2025.03.14) |
| Nov 18, 2025 | 89.52% (0.89524) | 99.64th | v4 (v2025.03.14) |
| Apr 15, 2025 | 92.32% (0.92320) | 99.70th | v4 (v2025.03.14) |
| Mar 26, 2025 | 89.04% (0.89040) | 99.51th | v4 (v2025.03.14) |
| Mar 23, 2025 | 86.87% (0.86869) | 99.39th | v4 (v2025.03.14) |
| Mar 20, 2025 | 85.05% (0.85048) | 99.34th | v4 (v2025.03.14) |
| Mar 17, 2025 | 87.68% (0.87682) | 99.43th | v4 (v2025.03.14) |
| Mar 7, 2025 | 26.30% (0.26301) | 96.84th | v3 (v2023.03.01) |
| Feb 27, 2025 | 22.83% (0.22833) | 96.62th | v3 (v2023.03.01) |
| Feb 2, 2025 | 18.51% (0.18512) | 96.26th | v3 (v2023.03.01) |
| Jan 25, 2025 | 20.24% (0.20239) | 96.40th | v3 (v2023.03.01) |
| Jan 12, 2025 | 18.48% (0.18480) | 96.23th | v3 (v2023.03.01) |
| Dec 12, 2024 | 0.05% (0.00048) | 19.90th | v3 (v2023.03.01) |
| Oct 18, 2024 | 0.04% (0.00043) | 9.69th | v3 (v2023.03.01) |
References (9)
- https://access.redhat.com/security/cve/CVE-2024-9264 Vendor Advisory
- https://bugzilla.redhat.com/show_bug.cgi?id=2316409 Issue Tracking
- https://github.com/advisories/GHSA-q99m-qcv4-fpm7 Advisory
- https://github.com/grafana/grafana/pull/81666
- https://grafana.com/blog/2024/10/17/grafana-security-release-critical-severity-fix-for-cve-2024-9264
- https://grafana.com/security/security-advisories/cve-2024-9264 Vendor Advisory
- https://nvd.nist.gov/vuln/detail/CVE-2024-9264
- https://security.netapp.com/advisory/ntap-20250314-0007
- https://www.cve.org/CVERecord?id=CVE-2024-9264
Change history (3)
- CISA ADP
- SSVC exploitation changed from poc to
none poc → none
- SSVC exploitation changed from poc to
none
- CISA ADP
- SSVC exploitation changed from none to
poc none → poc
- SSVC exploitation changed from none to
poc
- CISA ADP
- SSVC exploitation changed from poc to
none poc → none
- SSVC exploitation changed from poc to
none