cve.bz

CVE-2024-9264 grafana grafana: Code Injection

9.4 criticalExploitEPSS 98%Fix available

Critical (9.4) in grafana grafana. EPSS 98% estimated probability of exploitation activity in the next 30 days. Fixed in github.com/grafana/grafana 11.0.6+security-01, 11.1.7+security-01, 11.2.2+security-01.

On this page
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.

Severity

CVSS 4.0

9.4 critical
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

CVSS 3.1

8.8 high
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS
98% (unchanged from 98% a week ago; 97% 30 days ago) estimated probability of exploitation activity in the next 30 days; 100th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: PoC · Automatable: no · Technical impact: total, assessed 2024-11-01. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWEs
CWE-77 Improper Neutralization of Special Elements used in a Command
CWE-94 Improper Control of Generation of Code (Code Injection)
OWASP Top 10
A05:2025 Injection
Published
Modified
NVD analysis
Analyzed, since modified
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2024-9264 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2024-9264?via=ask-ai-copy and https://cve.bz/cve/CVE-2024-9264?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2024-9264 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the CNA's record in the CVE List.

ProductAffected
Grafanafrom 11.0.0 before 11.0.5
Grafanafrom 11.1.0 before 11.1.6
Grafanafrom 11.2.0 before 11.2.1
Grafanafrom 11.0.0 before 11.0.6
Grafanafrom 11.1.0 before 11.1.7
Grafanafrom 11.2.0 before 11.2.2

Fixed in

ProductFixed in
Grafana+security-01

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-q99m-qcv4-fpm7Gogithub.com/grafana/grafana>=11.0.0 <11.0.6+security-0111.0.6+security-01
GHSA-q99m-qcv4-fpm7Gogithub.com/grafana/grafana>=11.1.0 <11.1.7+security-0111.1.7+security-01
GHSA-q99m-qcv4-fpm7Gogithub.com/grafana/grafana>=11.2.0 <11.2.2+security-0111.2.2+security-01
GO-2024-3215Gogithub.com/grafana/grafanaall versionsno fix published

Linux distributions

DistributionReleasePackageFixed inAdvisory
Ubuntu16.04:LTSgrafanano fix listedUBUNTU-CVE-2024-9264
SUSELinux Enterprise Module for Package Hub 15 SP5, Linux Enterprise Module for Package Hub 15 SP6govulncheck-vulndb0.0.20241030T212825-150000.1.9.1SUSE-SU-2024:3911-1
SUSELinux Enterprise Module for Package Hub 15 SP6, Linux Enterprise Module for Package Hub 15 SP7grafana11.5.5-150200.3.72.2SUSE-SU-2025:01991-1
SUSELinux Enterprise Server 12 SP5-LTSS, Linux Enterprise Server LTSS Extended Security 12 SP5, Manager Client Tools 12golang-github-prometheus-node_exporter1.9.1-1.36.2SUSE-SU-2025:01987-1
SUSEManager Client Tools 12golang-github-prometheus-alertmanager0.26.0-1.31.2SUSE-SU-2025:01987-1
SUSEManager Client Tools 12golang-github-prometheus-prometheus2.53.4-1.60.2SUSE-SU-2025:01987-1
SUSEManager Client Tools 12grafana11.5.5-1.79.2SUSE-SU-2025:01987-1
SUSEManager Client Tools 12prometheus-blackbox_exporter0.26.0-1.27.1SUSE-SU-2025:01987-1
SUSEManager Client Tools 15golang-github-prometheus-prometheus2.53.4-150000.3.62.2SUSE-SU-2025:01989-1
SUSEManager Client Tools 15grafana11.5.5-150000.1.79.1SUSE-SU-2025:01989-1
SUSEManager Client Tools 15, Manager Client Tools for SLE Micro 5, Manager Proxy Module 4.3prometheus-blackbox_exporter0.26.0-150000.1.27.1SUSE-SU-2025:01989-1
SUSEManager Server 4.3release-notes-susemanager4.3.15.2-150400.3.133.1SUSE-SU-2025:01985-1
SUSEPackage Hub 12govulncheck-vulndb0.0.20241104T154416-5.1openSUSE-SU-2024:0350-1
openSUSELeap 15.5, Leap 15.6govulncheck-vulndb0.0.20241030T212825-150000.1.9.1SUSE-SU-2024:3911-1
openSUSELeap 15.6grafana11.5.5-150200.3.72.2SUSE-SU-2025:01991-1
openSUSELeap 15.6prometheus-blackbox_exporter0.26.0-150000.1.27.1SUSE-SU-2025:01989-1
openSUSETumbleweedgovulncheck-vulndb0.0.20241030T212825-1.1openSUSE-SU-2024:14447-1
openSUSETumbleweedgrafana11.3.0-1.1openSUSE-SU-2024:14431-1
Alpinev3.20grafana11.0.7-r0ALPINE-CVE-2024-9264

From the distributions' data via OSV.dev: Ubuntu Security Notices © Canonical Ltd., CC BY-SA 4.0; SUSE security data, CC BY 4.0; the Alpine secdb, CC BY-SA 4.0. Modified: reformatted and linked to CVE records. Credits. On the distributions' own pages: Ubuntu · SUSE · openSUSE · Alpine.

Red Hat

Red Hat rates this Critical.

Red Hat's statement

This vulnerability is classified as critical instead of important because it allows for command injection and local file inclusion, potentially leading to arbitrary code execution or unauthorized access to sensitive files. The exploit can be carried out by any user with VIEWER or higher permissions, significantly increasing the attack surface. Moreover, due to an incorrect implementation of feature flags, the SQL Expressions feature is enabled by default for the API, making it more likely to be exposed in affected deployments. Although the vulnerability requires the presence of the DuckDB binary in the Grafana process's PATH, systems that meet this condition are at significant risk.

It’s important to note that this issue was introduced in a Grafana version not included in any Red Hat offerings, ensuring that Red Hat customers are not impacted.

Red Hat's mitigation

Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base or stability.

ProductPackageStateAdvisory
Red Hat Enterprise Linux 10grafanaNot affected
Red Hat Enterprise Linux 8grafanaNot affected
Red Hat Enterprise Linux 9grafanaNot affected
Red Hat Storage 3grafanaNot affected

Contains Red Hat Security Data © Red Hat, Inc., licensed under CC BY 4.0. Source: https://access.redhat.com/security/data. Modified: reformatted. Red Hat's page for CVE-2024-9264.

Public exploits

GitHub PoC

Repositories on GitHub named after this CVE or listed for it by the PoC-in-GitHub index. For those marked Harbor Check: matches CVE, Flawharbor read the code and found it implements this CVE's exploitation technique: read, not run, and its dependencies only checked for warning signs, so a pointer and no guarantee. The rest are unverified: some hold a working proof of concept, some nothing useful, and some malware made to look like one. Read the code before you run any of it. How Harbor Check reads them, and what it found.

Detection rules

Ways to detect this CVE, not exploit code: the nuclei template that checks a system for it, and the Suricata and Snort rules that name it. A rule set may ship a rule turned off, so check yours by its sid.

Attack patterns (CAPEC)

  • CAPEC-35 Leverage Executable Code in Non-Executable Files Likelihood: High · Severity: Very High
  • CAPEC-77 Manipulating User-Controlled Variables Likelihood: High · Severity: Very High
  • CAPEC-242 Code Injection Likelihood: High · Severity: High
  • CAPEC-15 Command Delimiters Likelihood: High · Severity: High
  • CAPEC-40 Manipulating Writeable Terminal Devices Likelihood: High · Severity: Very High
  • CAPEC-43 Exploiting Multiple Input Interpretation Layers Likelihood: Medium · Severity: High
  • CAPEC-75 Manipulating Writeable Configuration Files Likelihood: High · Severity: Very High
  • CAPEC-76 Manipulating Web Input to File System Calls Likelihood: High · Severity: Very High
  • CAPEC-136 LDAP Injection Likelihood: High · Severity: High
  • CAPEC-183 IMAP/SMTP Command Injection Severity: Medium

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits. More on the page of CWE-77.

References

Check your stackJSON