Description
This module exploits an authenticated command injection vulnerability in Grafana's experimental SQL Expressions feature. Affected Grafana releases are 11.0.0 through 11.0.6, 11.1.0 through 11.1.7, and 11.2.0 through 11.2.2. They pass attacker-controlled SQL expressions to DuckDB without sufficient sanitization.
Successful command execution requires the duckdb binary to be available in the Grafana process PATH. This module uses DuckDB's shellfs community extension and Unix pipe syntax, so it is limited to Unix-like targets with shellfs available. The extension installation may download and cache files on the target.
Module options
To display the available options, load the module within the Metasploit console and run the commands 'show options' or 'show advanced':
msf > use exploit/multi/http/grafana/sql_expressions_rce_cve_2024_9264msf undefined(sql_expressions_rce_cve_2024_9264) > show actions ...actions...msf undefined(sql_expressions_rce_cve_2024_9264) > set ACTION < action-name >msf undefined(sql_expressions_rce_cve_2024_9264) > show options ...show and set options...msf undefined(sql_expressions_rce_cve_2024_9264) > runPrioritise with Active Threat Intelligence
With curated Threat Intelligence, you can see which vulnerabilities truly put you at risk, prioritize what matters most, and act before attackers do.
Explore Intelligence Hub