CVE-2024-6322: Github.com/grafana/grafana Remote Code Execution Vulnerability

MODERATE
Advisory Identifier: GHSA-hh8p-374f-qgr5
CVSS 4.4
CWE-266
Published
Advisory Summary

CVE-2024-6322 is a MODERATE (CVSS 4.4) remote code execution vulnerability (CWE-266: Incorrect Privilege Assignment) affecting Github.com/grafana/grafana libraries in the Go ecosystem. The issue involves grafana plugin data sources vulnerable to access control bypass. Remediation is available by upgrading affected packages to version 11.1.3, 11.1.1, 0.0.0-20240725142242-c326d865c58b, 1.9.2-0.20240725142242-c326d865c58b.

CVE-2024-6322 at a Glance

CVE Identifier CVE-2024-6322
GHSA Identifier GHSA-hh8p-374f-qgr5
Severity MODERATE
CVSS v3.1 Base Score 4.4
CWE Classification CWE-266: Incorrect Privilege Assignment
Affected Product Github.com/grafana/grafana
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 4.4

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:N/I:L/A:L).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required High (PR:H)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality None (C:N)
Integrity Low (I:L)
Availability Low (A:L)

How to Fix CVE-2024-6322

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.

github.com/grafana/grafana fixed: 11.1.3
Upgrade github.com/grafana/grafana to 11.1.3
github.com/grafana/grafana fixed: 11.1.1
Upgrade github.com/grafana/grafana to 11.1.1
github.com/grafana/grafana fixed: 0.0.0-20240725142242-c326d865c58b
Upgrade github.com/grafana/grafana to 0.0.0-20240725142242-c326d865c58b
github.com/grafana/grafana fixed: 1.9.2-0.20240725142242-c326d865c58b
Upgrade github.com/grafana/grafana to 1.9.2-0.20240725142242-c326d865c58b
Verify Direct and Transitive Dependencies

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-6322, 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.1.3), 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-266: Incorrect Privilege Assignment, where a product incorrectly assigns a privilege to a particular actor, creating an unintended sphere of control for that actor. 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

Access control for plugin data sources protected by the ReqActions json field of the plugin.json is bypassed if the user or service account is granted associated access to any other data source, as the ReqActions check was not scoped to each specific datasource. The account must have prior query access to the impacted datasource.

CVE-2024-6322 Affected Github.com/grafana/grafana Versions

4 component(s)
Fixed Versions:
11.1.311.1.10.0.0-20240725142242-c326d865c58b1.9.2-0.20240725142242-c326d865c58b
Product / Package Ecosystem Affected Versions Fixed Version
github.com/grafana/grafana
Go
≥ 11.1.2
< 11.1.3
All 1 versions
11.1.2
11.1.3
github.com/grafana/grafana
Go
≥ 11.1.0
< 11.1.1
All 1 versions
11.1.0
11.1.1
github.com/grafana/grafana
Go
≥ 0.0.0-20240521130516-0072e4a92d89
< 0.0.0-20240725142242-c326d865c58b
0.0.0-20240725142242-c326d865c58b
github.com/grafana/grafana
Go
≥ 1.9.2-0.20240521130516-0072e4a92d89
< 1.9.2-0.20240725142242-c326d865c58b
1.9.2-0.20240725142242-c326d865c58b

References

Frequently Asked Questions

What is CVE-2024-6322?
CVE-2024-6322 is a security vulnerability in Github.com/grafana/grafana involving Grafana plugin data sources vulnerable to access control bypass under CWE-266: Incorrect Privilege Assignment.
Which Github.com/grafana/grafana versions are affected?
Affected versions include releases prior to 11.1.3, 11.1.1, 0.0.0-20240725142242-c326d865c58b, 1.9.2-0.20240725142242-c326d865c58b across affected packages: github.com/grafana/grafana.
What version fixes CVE-2024-6322?
Upgrading to 11.1.3, 11.1.1, 0.0.0-20240725142242-c326d865c58b, 1.9.2-0.20240725142242-c326d865c58b (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/grafana/grafana affected?
Yes, github.com/grafana/grafana is affected in releases prior to 11.1.3, 11.1.1, 0.0.0-20240725142242-c326d865c58b, 1.9.2-0.20240725142242-c326d865c58b. Upgrade your dependency to 11.1.3, 11.1.1, 0.0.0-20240725142242-c326d865c58b, 1.9.2-0.20240725142242-c326d865c58b or later.
What is the CVSS score of CVE-2024-6322?
CVE-2024-6322 has a CVSS v3.1 base score of 4.4 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:N/I:L/A:L.
What CWE is associated with CVE-2024-6322?
CVE-2024-6322 is classified under CWE-266: Incorrect Privilege Assignment (A product incorrectly assigns a privilege to a particular actor, creating an unintended sphere of control for that actor.).
How can I check Go dependencies for CVE-2024-6322?
Run the dependency tree command: 'inspect dependencies for github.com/grafana/grafana'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-hh8p-374f-qgr5",
  "modified" : "2025-07-09T15:20:27Z",
  "published" : "2024-08-20T18:31:26Z",
  "aliases" : [ "CVE-2024-6322" ],
  "summary" : "Grafana plugin data sources vulnerable to access control bypass",
  "details" : "Access control for plugin data sources protected by the ReqActions json field of the plugin.json is bypassed if the user or service account is granted associated access to any other data source, as the ReqActions check was not scoped to each specific datasource. The account must have prior query access to the impacted datasource.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:H/UI:N/S:C/C:N/I:L/A:L"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:H/UI:N/VC:N/VI:N/VA:H/SC:N/SI:L/SA:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/grafana/grafana"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "11.1.0"
      }, {
        "fixed" : "11.1.1"
      } ]
    } ],
    "versions" : [ "11.1.0" ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/grafana/grafana"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "11.1.2"
      }, {
        "fixed" : "11.1.3"
      } ]
    } ],
    "versions" : [ "11.1.2" ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/grafana/grafana"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.0.0-20240521130516-0072e4a92d89"
      }, {
        "fixed" : "0.0.0-20240725142242-c326d865c58b"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/grafana/grafana"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.9.2-0.20240521130516-0072e4a92d89"
      }, {
        "fixed" : "1.9.2-0.20240725142242-c326d865c58b"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-6322"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/grafana/grafana/commit/4cb3ba5d1a7ab8b9676034e89dada2fcde1766ef"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/grafana/grafana/commit/9cdba084a9100c6b11d32eef9d2bd53656c6964a"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/grafana/grafana"
  }, {
    "type" : "WEB",
    "url" : "https://grafana.com/security/security-advisories/cve-2024-6322"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-266" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-08-20T20:04:53Z",
    "nvd_published_at" : "2024-08-20T18:15:09Z"
  }
}