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

HIGH
Advisory Identifier: GHSA-5mxf-42f5-j782
CVSS 6.0
CWE-269
Published
Advisory Summary

CVE-2024-1442 is a HIGH (CVSS 6.0) remote code execution vulnerability (CWE-269: Improper Privilege Management) affecting Github.com/grafana/grafana libraries in the Go ecosystem. The issue involves grafana's users with permissions to create a data source can crud all data sources. Remediation is available by upgrading affected packages to version 9.5.7, 10.0.12, 10.1.8, 10.2.5, 10.3.4.

CVE-2024-1442 at a Glance

CVE Identifier CVE-2024-1442
GHSA Identifier GHSA-5mxf-42f5-j782
Severity HIGH
CVSS v3.1 Base Score 6.0
CWE Classification CWE-269: Improper Privilege Management
Affected Product Github.com/grafana/grafana
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 6.0

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

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

How to Fix CVE-2024-1442

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: 9.5.7
Upgrade github.com/grafana/grafana to 9.5.7
github.com/grafana/grafana fixed: 10.0.12
Upgrade github.com/grafana/grafana to 10.0.12
github.com/grafana/grafana fixed: 10.1.8
Upgrade github.com/grafana/grafana to 10.1.8
github.com/grafana/grafana fixed: 10.2.5
Upgrade github.com/grafana/grafana to 10.2.5
github.com/grafana/grafana fixed: 10.3.4
Upgrade github.com/grafana/grafana to 10.3.4
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-1442, 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 9.5.7), 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-269: Improper Privilege Management, where the product does not properly assign, modify, track, or check privileges for an 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

A user with the permissions to create a data source can use Grafana API to create a data source with UID set to *. Doing this will grant the user access to read, query, edit and delete all data sources within the organization.

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

5 component(s)
Fixed Versions:
9.5.710.0.1210.1.810.2.510.3.4
Product / Package Ecosystem Affected Versions Fixed Version
github.com/grafana/grafana
Go
≥ 8.5.0
< 9.5.7
9.5.7
github.com/grafana/grafana
Go
≥ 10.0.0
< 10.0.12
10.0.12
github.com/grafana/grafana
Go
≥ 10.1.0
< 10.1.8
10.1.8
github.com/grafana/grafana
Go
≥ 10.2.0
< 10.2.5
10.2.5
github.com/grafana/grafana
Go
≥ 10.3.0
< 10.3.4
10.3.4

References

Frequently Asked Questions

What is CVE-2024-1442?
CVE-2024-1442 is a security vulnerability in Github.com/grafana/grafana involving Grafana's users with permissions to create a data source can CRUD all data sources under CWE-269: Improper Privilege Management.
Which Github.com/grafana/grafana versions are affected?
Affected versions include releases prior to 9.5.7, 10.0.12, 10.1.8, 10.2.5, 10.3.4 across affected packages: github.com/grafana/grafana.
What version fixes CVE-2024-1442?
Upgrading to 9.5.7, 10.0.12, 10.1.8, 10.2.5, 10.3.4 (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 9.5.7, 10.0.12, 10.1.8, 10.2.5, 10.3.4. Upgrade your dependency to 9.5.7, 10.0.12, 10.1.8, 10.2.5, 10.3.4 or later.
What is the CVSS score of CVE-2024-1442?
CVE-2024-1442 has a CVSS v3.1 base score of 6.0 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:L/A:L.
What CWE is associated with CVE-2024-1442?
CVE-2024-1442 is classified under CWE-269: Improper Privilege Management (The product does not properly assign, modify, track, or check privileges for an actor, creating an unintended sphere of control for that actor.).
How can I check Go dependencies for CVE-2024-1442?
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-5mxf-42f5-j782",
  "modified" : "2024-11-22T12:39:08Z",
  "published" : "2024-03-07T18:30:28Z",
  "aliases" : [ "CVE-2024-1442" ],
  "summary" : "Grafana's users with permissions to create a data source can CRUD all data sources",
  "details" : " A user with the permissions to create a data source can use Grafana API to create a data source with UID set to *.\nDoing this will grant the user access to read, query, edit and delete all data sources within the organization.\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:L/A:L"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:N/VC:H/VI:L/VA:L/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/grafana/grafana"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "8.5.0"
      }, {
        "fixed" : "9.5.7"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/grafana/grafana"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "10.0.0"
      }, {
        "fixed" : "10.0.12"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/grafana/grafana"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "10.1.0"
      }, {
        "fixed" : "10.1.8"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/grafana/grafana"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "10.2.0"
      }, {
        "fixed" : "10.2.5"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/grafana/grafana"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "10.3.0"
      }, {
        "fixed" : "10.3.4"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-1442"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/grafana/grafana"
  }, {
    "type" : "WEB",
    "url" : "https://grafana.com/security/security-advisories/cve-2024-1442"
  }, {
    "type" : "WEB",
    "url" : "https://security.netapp.com/advisory/ntap-20241122-0007"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-269" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-03-07T19:11:52Z",
    "nvd_published_at" : "2024-03-07T18:15:46Z"
  }
}