Security Digest · Vulnerability record

CVE-2024-9264: Grafana Command Injection And Local File Inclusion Via Sql Expressions

The SQL Expressions experimental feature of Grafana allows for the evaluation of duckdb queries containing user input.

CVSS 9.4 Critical EPSS 97.1% · p99.9

Should you act?

High exploit likelihood

EPSS ranks it in the top 5% of all CVEs for likely exploitation in the next 30 days. This signal is computed from CISA KEV, EPSS and CVSS data; it is not an editorial verdict.

  • Not in CISA KEV, but CISA’s SSVC assessment records a public proof-of-concept, so attack code exists.
  • EPSS 97.1%, percentile 99.9: FIRST’s model estimates a 97.1% chance of exploitation activity in the next 30 days, higher than 99.9% of all scored CVEs (very high). EPSS is a probability, not a verdict.
  • Needs an account (low (any account)). Exposure depends on who can log in.
  • Only applies if your dependency tree includes github.com/grafana/grafana (Go) >= 11.0.0, <= 11.0.6, fixed in 11.0.6+security-01; github.com/grafana/grafana (Go) >= 11.1.0, <= 11.1.7, fixed in 11.1.7+security-01; github.com/grafana/grafana (Go) >= 11.2.0, <= 11.2.2, fixed in 11.2.2+security-01. Check your lockfile, including transitive dependencies.

What it is

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.

From the GitHub advisory

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.

Weakness type: CWE-94, CWE-77.

Product: github.com/grafana/grafana (Go) · Assigned by: GRAFANA · Published: 2024-10-18

Affected and fixed versions

EcosystemPackageVulnerableFirst fixed
Gogithub.com/grafana/grafana>= 11.0.0, <= 11.0.611.0.6+security-01
Gogithub.com/grafana/grafana>= 11.1.0, <= 11.1.711.1.7+security-01
Gogithub.com/grafana/grafana>= 11.2.0, <= 11.2.211.2.2+security-01
VendorProductAffected versions (per CVE record)
GrafanaGrafana11.0.0 < 11.0.5, 11.1.0 < 11.1.6, 11.2.0 < 11.2.1, 11.0.0 < 11.0.6, 11.1.0 < 11.1.7, 11.2.0 < 11.2.2

Severity scores

Scored byCVSSScoreVector
GRAFANA4.09.4 CriticalCVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H
GRAFANA3.19.9 CriticalCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
GitHub4.09.4 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
  • Attack vector: network (remotely reachable)
  • Attack complexity: low
  • Attack requirements: none
  • Privileges required: low (any account)
  • User interaction: none

CVSS measures how bad a flaw is if exploited, not how likely exploitation is. Read it next to the exploitation data below.

Exploitation and urgency

  • CISA KEV: not listed (no confirmed in-the-wild exploitation known to CISA).
  • CISA SSVC assessment: exploitation poc, automatable no, technical impact total.
  • FIRST EPSS (model of 2026-10-21): 97.14% probability of exploitation activity in the next 30 days; percentile 99.9.

Timeline

  • — CVE record published by GRAFANA
  • — GitHub-reviewed advisory GHSA-q99m-qcv4-fpm7 published (critical)
  • — CVE record last updated

Sources and references

Original sources first. Version and fix details should always be confirmed against the vendor or project advisory.

Vulnerability records

  1. GitHub Advisory GHSA-q99m-qcv4-fpm7 github.com
  2. CVE.org record CVE-2024-9264 cve.org
  3. NVD entry CVE-2024-9264 nvd.nist.gov

Other references from the CVE record and advisory

  1. grafana.com grafana.com
  2. security.netapp.com security.netapp.com
  3. github.com github.com
  4. grafana.com grafana.com

Critical Go advisories · Today’s Security Digest