CVE-2024-9264
largeAuthenticated Command Injection & Local File Inclusion in Grafana SQL Expressions
CVE-2024-9264 is a command injection and local file inclusion flaw (CWE-94/CWE-77) in the experimental SQL Expressions feature of Grafana, in which user-supplied input passed into duckdb queries is insufficiently sanitized. Any authenticated user with VIEWER or higher permissions can trigger it by submitting a crafted SQL expression, and the attack only works when the duckdb binary is present in the Grafana server's $PATH, which is not the case in default Grafana distributions. Successful exploitation allows the attacker to execute arbitrary operating-system commands as the Grafana process and read arbitrary local files on the server, potentially exposing configuration data and data-source credentials. Only Grafana deployments that use the SQL Expressions experimental feature and have duckdb installed on the host are exploitable, although the vulnerable code path is present in the product's standard builds. There is currently no public proof-of-concept and the flaw is not listed in CISA KEV, but its EPSS score of 94.9% (100th percentile) indicates a very high probability of exploitation within 30 days.
What to do: Upgrade Grafana to the patched release identified in the Grafana Labs security advisory (exact fixed version numbers were not provided in the source data). As interim mitigations, remove the duckdb binary from the Grafana server's $PATH or disable/limit the SQL Expressions experimental feature, and restrict which VIEWER-or-higher accounts can access affected dashboards. Review server logs for unexpected duckdb invocations or anomalous local file reads to check for prior exploitation.
| Grafana Labs Grafana | — |
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
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.
- Vendors
- grafana
- Products
- grafana
- Weakness
- CWE-94, CWE-77
- Vector
- 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
In the news0 stories
No ingested article mentions this CVE yet.