Exploit database

Vulnerability

CVE-2024-9264

Grafana SQL Expressions allow for remote code execution

Vulnerability details

Score
9.4
Severity
critical

CVSS 4.0 · GRAFANA

Vector string

CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H

Description

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.

CVE Program

Exploit source choices

10 sources
Grafana SQL Expressions DuckDB Command Injection
MSF-multi--http--grafana_sql_expressions_rce_cve_2024_9264MetasploitUnix / remotePreferred

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.

2024-10-17grafana_sql_expressions_rce_cve_2024_9264.rb
nollium/cve-2024-9264
GH-a7849282735d84f8f8342d3578438e56GitHubUnofficial GitHub source

Exploit for Grafana arbitrary file-read and RCE (CVE-2024-9264)

2024-10-194 files · 131 stars
z3k0sec/file-read-cve-2024-9264
GH-99768bfefd6ba018ad874781770e8e8fGitHubUnofficial GitHub source

File Read Proof of Concept for CVE-2024-9264

2024-10-204 files · 8 stars
cythonic1/cve-2024-9264
GH-432f16e7c4aeabbd2e2db8d1f8057b61GitHubUnofficial GitHub source

A go implementation for CVE-2024-9264 which effect grafana versions 11.0.x, 11.1.x, and 11.2.x.

2025-05-314 files · 3 stars
rvzsec/cve-2024-9264
GH-f7d0bd02e8e977a92ac04aed9d3b3a99GitHubUnofficial GitHub source

Authenticated RCE in Grafana (v11.0) via SQL Expressions - PoC Exploit

2025-07-072 files · 2 stars
12442rf/poc
GH-3a840c3a743e0417793b49231edf2d51GitHubUnofficial GitHub source

12442rf/poc source repository

2025-05-0612 files · 1 stars
14mb1v45h/cyberspace061
GH-75ed4bcfc07ad1d01a38c18f15aff057GitHubUnofficial GitHub source

RCE exploit via SQL Expressions

2024-10-304 files · 0 stars
bhanunamikaze/vaktscan
GH-e27a7fd3724f4056b7a428d25bdec823GitHubUnofficial GitHub source

An high-performance security scanner designed for comprehensive vulnerability assessment of monitoring and logging infrastructure stacks with concurrent processing and extensive CVE coverage.

2025-09-11154 files · 0 stars