Skip to main content
← All vulnerabilities
CVE-2024-9264GO-2024-3215BIT-GRAFANA-2024-9264GHSA-Q99M-QCV4-FPM7

Grafana SQL Expressions allow for remote code execution

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in +security-01, 11.0.6+security-01, 11.1.7+security-01, 11.2.2+security-01
1 Metasploit module, 14 proofs of concept on GitHub, 1 Nuclei template
  • Exploitation: poc
  • Automatable: no
  • Technical impact: total

Summary

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.

Timeline

  1. CVE published
  2. CISA SSVC assessment

    Exploitation: poc · Automatable: no · Technical impact: total

  3. Record last updated
  4. EPSS reached 10%

    FIRST estimates at least a 10% chance of exploitation in the next 30 days

Affected versions

  • Grafana Grafana

    From 11.0.0 · fixed in +security-01; From 11.1.0 · fixed in +security-01; From 11.2.0 · fixed in +security-01; From 11.0.0 · fixed in +security-01; From 11.1.0 · fixed in +security-01; From 11.2.0 · fixed in +security-01

  • github.com/grafana/grafanaGo

    All versions

  • github.com/grafana/grafanaGo

    From 11.0.0 · fixed in 11.0.6+security-01

  • github.com/grafana/grafanaGo

    From 11.1.0 · fixed in 11.1.7+security-01

  • github.com/grafana/grafanaGo

    From 11.2.0 · fixed in 11.2.2+security-01

References 17

grafana.com

GitHub · rapid7/metasploit-framework

GitHub · projectdiscovery/nuclei-templates

GitHub · Cythonic1/CVE-2024-9264

GitHub · Exerrdev/CVE-2024-9264-Fixed

GitHub · Royall-Researchers/CVE-2024-9264

GitHub · amalpvatayam67/day05-grafana-sqlexpr-lab

GitHub · barun121/CVE-2024-9264-in-Grafana-11.x

GitHub · ferralon-demo/grafana-cve-2024-9264-duckdb-rce

GitHub · nollium/CVE-2024-9264

GitHub · ozcanpng/CVE-2024-9264

GitHub · patrickpichler/grafana-CVE-2024-9264

GitHub · ruizii/CVE-2024-9264

GitHub · rvzsec/CVE-2024-9264

GitHub · yeonchoda/CVE-2024-9264

GitHub · z3k0sec/CVE-2024-9264-RCE-Exploit

GitHub · z3k0sec/File-Read-CVE-2024-9264