CVE-2024-9264: Github.com/grafana/grafana Grafana Command Injection And Local Vulnerability
CRITICALCVE-2024-9264 is a CRITICAL (CVSS 9.9) grafana command injection and local vulnerability (CWE-94: Improper Control of Generation of Code ('Code Injection')) affecting Github.com/grafana/grafana libraries in the Go ecosystem. The issue involves grafana command injection and local file inclusion via sql expressions. Remediation is available by upgrading affected packages to version 11.0.6+security-01, 11.1.7+security-01, 11.2.2+security-01.
CVE-2024-9264 at a Glance
Security Impact
CVSS: 9.9
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H).
How to Fix CVE-2024-9264
To remediate this vulnerability, upgrade all affected Github.com/grafana/grafana dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/grafana/grafana to 11.0.6+security-01
Upgrade github.com/grafana/grafana to 11.1.7+security-01
Upgrade github.com/grafana/grafana to 11.2.2+security-01
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/grafana/grafana
How to Check if You Are Affected
To determine whether your application is affected by CVE-2024-9264, inspect your project dependencies for Github.com/grafana/grafana:
inspect dependencies for github.com/grafana/grafana
Analyze the terminal output to locate any version of Github.com/grafana/grafana in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 11.0.6+security-01), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-94: Improper Control of Generation of Code ('Code Injection'), where the product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment. In Github.com/grafana/grafana, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2024-9264 Affected Github.com/grafana/grafana Versions
3 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/grafana/grafana
|
Go |
≥ 11.0.0
< 11.0.6+security-01
|
11.0.6+security-01
|
|
github.com/grafana/grafana
|
Go |
≥ 11.1.0
< 11.1.7+security-01
|
11.1.7+security-01
|
|
github.com/grafana/grafana
|
Go |
≥ 11.2.0
< 11.2.2+security-01
|
11.2.2+security-01
|
References
Frequently Asked Questions
What is CVE-2024-9264?
Which Github.com/grafana/grafana versions are affected?
What version fixes CVE-2024-9264?
Is github.com/grafana/grafana affected?
What is the CVSS score of CVE-2024-9264?
What CWE is associated with CVE-2024-9264?
How can I check Go dependencies for CVE-2024-9264?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-q99m-qcv4-fpm7",
"modified" : "2025-03-14T20:26:23Z",
"published" : "2024-10-18T06:30:32Z",
"aliases" : [ "CVE-2024-9264" ],
"summary" : "Grafana Command Injection And Local File Inclusion Via Sql Expressions",
"details" : "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" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H"
}, {
"type" : "CVSS_V4",
"score" : "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"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/grafana/grafana"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "11.0.0"
}, {
"fixed" : "11.0.6+security-01"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 11.0.6"
}
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/grafana/grafana"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "11.1.0"
}, {
"fixed" : "11.1.7+security-01"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 11.1.7"
}
}, {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/grafana/grafana"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "11.2.0"
}, {
"fixed" : "11.2.2+security-01"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 11.2.2"
}
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-9264"
}, {
"type" : "WEB",
"url" : "https://github.com/grafana/grafana/pull/81666"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/grafana/grafana"
}, {
"type" : "WEB",
"url" : "https://grafana.com/blog/2024/10/17/grafana-security-release-critical-severity-fix-for-cve-2024-9264"
}, {
"type" : "WEB",
"url" : "https://grafana.com/security/security-advisories/cve-2024-9264"
}, {
"type" : "WEB",
"url" : "https://security.netapp.com/advisory/ntap-20250314-0007"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-77", "CWE-94" ],
"severity" : "CRITICAL",
"github_reviewed" : true,
"github_reviewed_at" : "2024-10-25T14:13:42Z",
"nvd_published_at" : "2024-10-18T04:15:04Z"
}
}