CRITICAL✓ PATCH🇵🇱 Wersja polska

CVE-2024-9264

CVSS 9.4v4.0pub. 2024-10-18upd. 2025-03-14

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.

🤖 AI Analysis
How it works

The SQL Expressions feature allows evaluation of duckdb queries with user-provided input data. Due to insufficient sanitization of this input data before passing it to the duckdb process, an attacker can inject malicious system commands or references to local files. The attack requires the presence of the duckdb binary in the $PATH environment variable of the Grafana server — it is not installed by default in standard Grafana distributions.

Impact

An attacker with VIEWER privileges or higher can execute arbitrary system commands on the server (command injection) and read any local files (local file inclusion), which may result in complete server takeover and disclosure of sensitive data.

Mitigation & patch

Apply patches available from the vendor according to references (https://grafana.com/security/security-advisories/cve-2024-9264/). As a workaround, ensure that the duckdb binary is NOT present in the $PATH of the Grafana server and disable the experimental SQL Expressions feature if it is not required.

Who is affected

Grafana with the experimental SQL Expressions feature enabled and duckdb binary present in $PATH — versions indicated in vendor references

Analysis generated by Claude AI (Anthropic) based on NVD data. Always verify with vendor.
CVSS Vector
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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
  • Grafana

    APP
    Grafana
    11.0.0
🟢
PATCH AVAILABLE
Vendor update available. Deploy in standard maintenance cycle.
CWE
References

Related vulnerabilities

CVE-2021-39226CRITICAL9.8⚠ KEVPL ✓same product

Grafana – ominięcie uwierzytelnienia i nieuprawniony dostęp do snapshotów

CVE-2026-27876CRITICAL9.1PL ✓same product

RCE w Grafana przez SQL Expressions i plugin Enterprise (CVE-2026-27876)

CVE-2025-41115CRITICAL10.0PL ✓same product

Grafana Enterprise: privilege escalation przez SCIM provisioning (LPE)

CVE-2023-3128CRITICAL9.4PL ✓same product

Grafana: Pominięcie uwierzytelniania przez manipulację emailem w Azure AD OAuth

CVE-2022-39328CRITICAL9.8PL ✓same product

Race condition w Grafana umożliwia nieautoryzowany dostęp do endpointów administracyjnych