Grafana Labs reports critical flaw in Grafana 11
Take action: If you are using Grafana 11 or newer, patch now or remove DuckDB binary from the systems or from the PATH accessible to Grafana (ideally both). The vulnerability has some prerequisites - a real user to authenticate, but any Grafana system has a lot of users. Don't bet on them not being breached. Patch quickly, or disable the DuckDB.
Learn More
Grafana Labs, the company behind the popular open-source data analytics and visualization platform Grafana, has disclosed a critical vulnerability that could lead to remote code execution.
The flaw is tracked as CVE-2024-9264 (CVSS score 9.4), was identified in Grafana version 11 and newer. The vulnerability was linked to the "SQL Expressions" feature, introduced as an experimental capability for post-processing data source outputs using SQL queries directed at DuckDB, an open-source relational database. The vulnerability allows attackers to execute arbitrary commands or include local files via malicious SQL queries.
The SQL Expressions feature fails to properly sanitize SQL queries sent to DuckDB’s command line interface (CLI), enabling both command injection and local file inclusion. The vulnerability is exploitable by any user with “viewer” permissions or higher. It only poses a risk if the DuckDB binary is installed and included in the PATH of the Grafana process environment—this is not a default configuration.
Open-source intelligence (OSINT) data from Netlas.io suggests that over 100,000 Grafana instances may be vulnerable to CVE-2024-9264, with nearly 19,000 of these located in the United States.
Grafana Labs has released six new versions to address this vulnerability:
- Security-Only Patches:
- Grafana 11.0.5+security-01
- Grafana 11.1.6+security-01
- Grafana 11.2.1+security-01
- Patch and Upgrade:
- Grafana 11.0.6+security-01
- Grafana 11.1.7+security-01
- Grafana 11.2.2+security-01
Grafana strongly recommends applying the security patch as soon as possible. Users can also mitigate the vulnerability by removing the DuckDB binary from their systems or from the PATH accessible to Grafana. The company has disabled SQL Expressions entirely in patched versions to prevent exploitation.