CVE-2018-15727: Github.com/grafana/grafana Authentication Bypass Vulnerability

CRITICAL
Advisory Identifier: GHSA-rgjg-66cx-5x9m
CVSS 9.8
CWE-287
Published
Advisory Summary

CVE-2018-15727 is a CRITICAL (CVSS 9.8) authentication bypass vulnerability (CWE-287: Improper Authentication) affecting Github.com/grafana/grafana libraries in the Go ecosystem. The issue involves grafana authentication bypass. Remediation is available by upgrading affected packages to version 4.6.4, 5.2.3.

CVE-2018-15727 at a Glance

CVE Identifier CVE-2018-15727
GHSA Identifier GHSA-rgjg-66cx-5x9m
Severity CRITICAL
CVSS v3.1 Base Score 9.8
CWE Classification CWE-287: Improper Authentication
Affected Product Github.com/grafana/grafana
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 9.8

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

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 High (A:H)

How to Fix CVE-2018-15727

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: 4.6.4
Upgrade github.com/grafana/grafana to 4.6.4
github.com/grafana/grafana fixed: 5.2.3
Upgrade github.com/grafana/grafana to 5.2.3
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-2018-15727, 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 4.6.4), 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-287: Improper Authentication, where when an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct. 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 before 4.6.4 and 5.x before 5.2.3 allows authentication bypass because an attacker can generate a valid "remember me" cookie knowing only a username of an LDAP or OAuth user. ### Specific Go Packages Affected github.com/grafana/grafana/pkg/api

CVE-2018-15727 Affected Github.com/grafana/grafana Versions

2 component(s)
Fixed Versions:
4.6.45.2.3
Product / Package Ecosystem Affected Versions Fixed Version
github.com/grafana/grafana
Go
< 4.6.4
4.6.4
github.com/grafana/grafana
Go
≥ 5.0.0
< 5.2.3
5.2.3

References

Frequently Asked Questions

What is CVE-2018-15727?
CVE-2018-15727 is a security vulnerability in Github.com/grafana/grafana involving Grafana Authentication Bypass under CWE-287: Improper Authentication.
Which Github.com/grafana/grafana versions are affected?
Affected versions include releases prior to 4.6.4, 5.2.3 across affected packages: github.com/grafana/grafana.
What version fixes CVE-2018-15727?
Upgrading to 4.6.4, 5.2.3 (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 4.6.4, 5.2.3. Upgrade your dependency to 4.6.4, 5.2.3 or later.
What is the CVSS score of CVE-2018-15727?
CVE-2018-15727 has a CVSS v3.1 base score of 9.8 (CRITICAL) with vector string CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2018-15727?
CVE-2018-15727 is classified under CWE-287: Improper Authentication (When an actor claims to have a given identity, the product does not prove or insufficiently proves that the claim is correct.).
How can I check Go dependencies for CVE-2018-15727?
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-rgjg-66cx-5x9m",
  "modified" : "2023-10-02T12:01:50Z",
  "published" : "2022-02-15T01:57:18Z",
  "aliases" : [ "CVE-2018-15727" ],
  "summary" : "Grafana Authentication Bypass",
  "details" : "Grafana before 4.6.4 and 5.x before 5.2.3 allows authentication bypass because an attacker can generate a valid \"remember me\" cookie knowing only a username of an LDAP or OAuth user.\n\n### Specific Go Packages Affected\ngithub.com/grafana/grafana/pkg/api",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/grafana/grafana"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "4.6.4"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/grafana/grafana"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.0.0"
      }, {
        "fixed" : "5.2.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2018-15727"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/grafana/grafana/commit/7baecf0d0deae0d865e45cf03e082bc0db3f28c3"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/grafana/grafana/commit/df83bf10a225811927644bdf6265fa80bdea9137"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2018:3829"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2019:0019"
  }, {
    "type" : "WEB",
    "url" : "https://grafana.com/blog/2018/08/29/grafana-5.2.3-and-4.6.4-released-with-important-security-fix"
  }, {
    "type" : "WEB",
    "url" : "https://www.securityfocus.com/bid/105184"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-287" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-05-20T21:09:16Z",
    "nvd_published_at" : null
  }
}