CVE-2023-3128: Github.com/grafana/grafana Authentication Bypass Vulnerability

CRITICAL
Advisory Identifier: GHSA-mpv3-g8m3-3fjc
CVSS 9.4
CWE-290
Published
Advisory Summary

CVE-2023-3128 is a CRITICAL (CVSS 9.4) authentication bypass vulnerability (CWE-290: Authentication Bypass by Spoofing) affecting Github.com/grafana/grafana libraries in the Go ecosystem. The issue involves grafana vulnerable to authentication bypass by spoofing. Remediation is available by upgrading affected packages to version 9.4.13, 9.3.16, 9.2.20, 8.5.27.

CVE-2023-3128 at a Glance

CVE Identifier CVE-2023-3128
GHSA Identifier GHSA-mpv3-g8m3-3fjc
Severity CRITICAL
CVSS v3.1 Base Score 9.4
CWE Classification CWE-290: Authentication Bypass by Spoofing
Affected Product Github.com/grafana/grafana
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 9.4

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

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

How to Fix CVE-2023-3128

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.4.13
Upgrade github.com/grafana/grafana to 9.4.13
github.com/grafana/grafana fixed: 9.3.16
Upgrade github.com/grafana/grafana to 9.3.16
github.com/grafana/grafana fixed: 9.2.20
Upgrade github.com/grafana/grafana to 9.2.20
github.com/grafana/grafana fixed: 8.5.27
Upgrade github.com/grafana/grafana to 8.5.27
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-2023-3128, 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.4.13), 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-290: Authentication Bypass by Spoofing, where this attack-focused weakness is caused by incorrectly implemented authentication schemes that are subject to spoofing attacks. 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

Grafana is validating Azure AD accounts based on the email claim. On Azure AD, the profile email field is not unique and can be easily modified. This leads to account takeover and authentication bypass when Azure AD OAuth is configured with a multi-tenant app.

CVE-2023-3128 Affected Github.com/grafana/grafana Versions

4 component(s)
Fixed Versions:
9.4.139.3.169.2.208.5.27
Product / Package Ecosystem Affected Versions Fixed Version
github.com/grafana/grafana
Go
≥ 9.4.0
< 9.4.13
9.4.13
github.com/grafana/grafana
Go
≥ 9.3.0
< 9.3.16
9.3.16
github.com/grafana/grafana
Go
≥ 9.0.0
< 9.2.20
9.2.20
github.com/grafana/grafana
Go
< 8.5.27
8.5.27

References

Frequently Asked Questions

What is CVE-2023-3128?
CVE-2023-3128 is a security vulnerability in Github.com/grafana/grafana involving Grafana vulnerable to Authentication Bypass by Spoofing under CWE-290: Authentication Bypass by Spoofing.
Which Github.com/grafana/grafana versions are affected?
Affected versions include releases prior to 9.4.13, 9.3.16, 9.2.20, 8.5.27 across affected packages: github.com/grafana/grafana.
What version fixes CVE-2023-3128?
Upgrading to 9.4.13, 9.3.16, 9.2.20, 8.5.27 (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.4.13, 9.3.16, 9.2.20, 8.5.27. Upgrade your dependency to 9.4.13, 9.3.16, 9.2.20, 8.5.27 or later.
What is the CVSS score of CVE-2023-3128?
CVE-2023-3128 has a CVSS v3.1 base score of 9.4 (CRITICAL) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L.
What CWE is associated with CVE-2023-3128?
CVE-2023-3128 is classified under CWE-290: Authentication Bypass by Spoofing (This attack-focused weakness is caused by incorrectly implemented authentication schemes that are subject to spoofing attacks.).
How can I check Go dependencies for CVE-2023-3128?
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-mpv3-g8m3-3fjc",
  "modified" : "2025-02-13T19:00:46Z",
  "published" : "2023-06-22T21:30:49Z",
  "aliases" : [ "CVE-2023-3128" ],
  "summary" : "Grafana vulnerable to Authentication Bypass by Spoofing",
  "details" : "Grafana is validating Azure AD accounts based on the email claim. \n\nOn Azure AD, the profile email field is not unique and can be easily modified. \n\nThis leads to account takeover and authentication bypass when Azure AD OAuth is configured with a multi-tenant app.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/grafana/grafana"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "9.4.0"
      }, {
        "fixed" : "9.4.13"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/grafana/grafana"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "9.3.0"
      }, {
        "fixed" : "9.3.16"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/grafana/grafana"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "9.0.0"
      }, {
        "fixed" : "9.2.20"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/grafana/grafana"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "8.5.27"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/grafana/bugbounty/security/advisories/GHSA-gxh2-6vvc-rrgp"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-3128"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/grafana/grafana"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/grafana/grafana/blob/69fc4e6bc0be2a82085ab3885c2262a4d49e97d8/CHANGELOG.md"
  }, {
    "type" : "WEB",
    "url" : "https://grafana.com/security/security-advisories/cve-2023-3128"
  }, {
    "type" : "WEB",
    "url" : "https://security.netapp.com/advisory/ntap-20230714-0004"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-290" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-06-23T21:38:39Z",
    "nvd_published_at" : "2023-06-22T21:15:09Z"
  }
}