Grafana SQL Expressions allow for remote code execution
Grafana
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| github.com/grafana/grafana Go |
|
|
Grafana
| Product | Affected | Fixed in |
|---|---|---|
| github.com/grafana/grafana Go |
|
|
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.
From the CVE record · GRAFANA
Grafana's experimental SQL Expressions feature insufficiently sanitizes user input in queries passed to duckdb. A user with VIEWER or higher permission can exploit this for command injection and local file inclusion if the duckdb binary is in Grafana's PATH; the binary is not installed by default in Grafana distributions.
Teams running Grafana or the Go package github.com/grafana/grafana should check affected 11.0.x, 11.1.x, and 11.2.x versions before their respective security fixes.