Cyber Resilience

CVE-2021-39226

Auth Bypass in Grafana ≤ 7.5.11

CISA KEVActive ExploitationEUVD ExploitedPublic PoCAuth BypassAccess Control
Published
05 October 2021
Modified
24 October 2025
KEV Added
25 August 2022
Patch / advisory
CVSS Score v3.1 9.8
Click a component to see what it means
Raw vectorCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS Score 0.99 100.0th percentile
Risk Priority 97 floored blend · peak EPSS

Summary

CVE-2021-39226 is a critical-severity Improper Authentication (CWE-287) vulnerability in Grafana Grafana. Its CVSS base score is 9.8 (Critical).

Operationally, exploitation aligns with the MITRE ATT&CK technique Exploitation for Privilege Escalation (T1068); ranked in the top 0.0% of CVEs by exploit likelihood; CISA has added it to the Known Exploited Vulnerabilities catalog; a public proof-of-concept is referenced.

Deeper analysis AI-assisted summary

Synthesised by an AI model from the NVD description and linked references — a reading aid, not an authoritative source.

Grafana is an open source data visualization platform affected by improper authentication and authorization flaws (CWE-287 and CWE-862) that allow access to snapshot resources. In vulnerable versions, both unauthenticated and authenticated users can retrieve the snapshot possessing the lowest database key by directly requesting the paths /dashboard/snapshot/:key or /api/snapshots/:key. When the snapshot public_mode setting is enabled, unauthenticated users can additionally delete that snapshot via /api/snapshots-delete/:deleteKey, while authenticated users can perform the same deletion regardless of the setting.

An attacker can therefore enumerate and exfiltrate snapshot contents by repeatedly accessing the lowest-key resource, then delete each snapshot after retrieval, resulting in complete loss of snapshot data while traversing the entire collection. The vulnerability carries a CVSS 3.1 score of 9.8 and requires no privileges or user interaction.

Official advisories and patches state that the issue is resolved in Grafana 8.1.6 and 7.5.11. Organizations unable to upgrade immediately are advised to deploy a reverse proxy or equivalent control to block the literal paths /api/snapshots/:key, /api/snapshots-delete/:deleteKey, /dashboard/snapshot/:key, and /api/snapshots/:key, which have no required operational function.

OWASP Top 10 for Web (2025)

EU & UK References

Vulnerability Data

Grafana is an open source data visualization platform. In affected versions unauthenticated and authenticated users are able to view the snapshot with the lowest database key by accessing the literal paths: /dashboard/snapshot/:key, or /api/snapshots/:key. If the snapshot "public_mode" configuration setting…

more

is set to true (vs default of false), unauthenticated users are able to delete the snapshot with the lowest database key by accessing the literal path: /api/snapshots-delete/:deleteKey. Regardless of the snapshot "public_mode" setting, authenticated users are able to delete the snapshot with the lowest database key by accessing the literal paths: /api/snapshots/:key, or /api/snapshots-delete/:deleteKey. The combination of deletion and viewing enables a complete walk through all snapshot data while resulting in complete snapshot data loss. This issue has been resolved in versions 8.1.6 and 7.5.11. If for some reason you cannot upgrade you can use a reverse proxy or similar to block access to the literal paths: /api/snapshots/:key, /api/snapshots-delete/:deleteKey, /dashboard/snapshot/:key, and /api/snapshots/:key. They have no normal function and can be disabled without side effects.

CWE(s)
KEV Date Added
25 August 2022

Related Threats

MITRE ATT&CK Enterprise Techniques

T1068 Exploitation for Privilege Escalation Privilege Escalation
Adversaries may exploit software vulnerabilities in an attempt to elevate privileges.
T1133 External Remote Services Persistence
Adversaries may leverage external-facing remote services to initially access and/or persist within a network.
T1190 Exploit Public-Facing Application Initial Access
Adversaries may attempt to exploit a weakness in an Internet-facing host or system to initially access a network.
T1210 Exploitation of Remote Services Lateral Movement
Adversaries may exploit remote services to gain unauthorized access to internal systems once inside of a network.
T1040 Network Sniffing Credential Access
Adversaries may passively sniff network traffic to capture information about an environment, including authentication material passed over the network.
T1134 Access Token Manipulation Stealth
Adversaries may modify access tokens to operate under a different user or system security context to perform actions and bypass access controls.
Derived from this CVE’s CWE(s) via the direct CWE→ATT&CK cross-walk.

CVEs Like This One

CVE-2022-0492Same product: Fedoraproject Fedoraboth on KEV
CVE-2021-37976Same product: Fedoraproject Fedoraboth on KEV
CVE-2023-2183Same product: Grafana Grafana
CVE-2023-43090Same product: Fedoraproject Fedora
CVE-2024-38810Shared CWE-287, CWE-862
CVE-2023-20252Shared CWE-287, CWE-862
CVE-2024-47768Shared CWE-287, CWE-862
CVE-2025-46348Shared CWE-287, CWE-862
CVE-2023-40376Shared CWE-287, CWE-862
CVE-2021-30657Shared CWE-862both on KEV

Affected Assets

grafana
grafana
≤ 7.5.11 · 8.0.0 — 8.1.6
fedoraproject
fedora
34, 35

Mitigating Controls

Control response

Prevent
Stop it (NIST 800-53)

Detect
Catch it (NIST detect / respond)

Harden
Shrink the surface (DISA STIG)
  • 13 hardening rules · 5 OS baselines
Validate
Prove the fix (OWASP ASVS)
  • V6.4.4
  • V6.5.4
  • V6.5.5
  • V6.5.7

Likely Mitigating Controls AI

Per-CVE control mapping for this CVE has not run yet; the list below is derived from the weakness types (CWEs) cited in the NVD entry.

addresses: CWE-287 CWE-862

Session content review can reveal authentication bypasses or failures in session establishment.

addresses: CWE-287 CWE-862

Assessments check authentication mechanisms for correct implementation and effectiveness, reducing successful authentication bypass attempts.

addresses: CWE-287 CWE-862

Identity providers centralize and enforce authentication mechanisms, reducing improper authentication.

addresses: CWE-862 CWE-287

Requires explicit authorization before any identifier can be assigned, preventing missing authorization.

addresses: CWE-287 CWE-862

Personnel screening, identity verification, and access-agreement requirements support reliable authentication and reduce authentication bypass opportunities.

addresses: CWE-287 CWE-862

Requiring explicit security roles and risk integration in the SDLC forces authentication mechanisms to be planned, documented, and validated instead of omitted or weakly implemented.

addresses: CWE-287 CWE-862

Decoy authentication surfaces detect bypass attempts and deflect real credential attacks through observable malicious interactions.

addresses: CWE-862

Requiring an access control policy ensures authorization checks are defined and applied for critical functions.

Mitigating Controls (NIST CSF 2.0) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→CSF cross-walk (authority under review) — links open the control.

PR.AA-05 full match
prevents

Explicitly requires defining, enforcing, and reviewing authorizations and least privilege, directly preventing missing authorization checks.

PR.AA-03 mostly match
prevents

PR.AA-03 directly enforces authentication mechanisms that eliminate most improper-authentication defects, yet CWE-287 spans additional vectors (missing checks, flawed protocols, session handling) that one control does not fully close.

PR.AA-04 mostly match
prevents

PR.AA-04 directly enables verification of identity assertions (mostly preventing CWE-287 in that scope) yet leaves many other authentication failure modes unaddressed (only partial prevention overall).

PR.AA-01 partial match
prevents

PR.AA-01 supplies and governs credentials/tokens that authentication relies on, removing some weak-credential cases, yet leaves verification logic, missing checks, and protocol flaws untouched.

PR.AA-02 partial match
prevents

PR.AA-02 ensures valid enrollment and unique credential binding, which reduces some improper-auth risks at issuance time but leaves runtime claim verification untouched, so each direction only partially addresses the other.

PR.PS-01 partial match
prevents

PR.PS-01 can enforce auth-related settings via hardened baselines and default reviews, blocking some config-based instances of CWE-287, yet leaves code-level auth flaws untouched so neither direction reaches mostly.

Mitigating Controls (ISO/IEC 27001:2022 Annex A) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→ISO cross-walk (authority under review) — links open the control.

prevents

Requiring authentication methods whose strength matches the sensitivity of the data and mandating multi-factor authentication directly blocks attempts to access resources without proving identity.

prevents

Verifying user identity before issuing replacement credentials and forcing changes after compromise reduces the likelihood that authentication bypass can be achieved through stolen or weak credentials.

prevents

Requiring authentication and credentials before any access occurs eliminates the absence of authorization checks that would otherwise allow an unauthenticated actor to reach protected resources.

prevents

Requiring formal authorization of every access request before rights are granted ensures that checks for required permissions are performed, preventing missing authorization checks from being introduced.

prevents

Mandating segregated approval and oversight for non-human identities reduces the chance that weak or orphaned credentials can be exploited for unauthorized authentication.

prevents

Mandatory authorization checks and central records of granted rights ensure that every access attempt is preceded by an explicit decision rather than relying on missing checks.

Hardening callouts derived

Configuration rules from DISA STIG baselines that bear on weaknesses of the type cited by this CVE. Each rule is shown with the relationship its mapping actually records, against the CWE it was authored against. Derived via CVE→CWE over `controls_xwalks` (authoritative rows only; rows rated `none` are excluded).

Oracle Linux 8 (3 rules)
  • V-248827 OL 8 must not have the rsh-server package installed. prevents CWE-287
  • V-248581 OL 8 must require users to provide a password for privilege escalation. prevents CWE-862
  • V-252656 The OL 8 operating system must not be configured to bypass password requirements for privilege escalation. prevents CWE-862
RHEL 7 (5 rules)
  • V-204425 The Red Hat Enterprise Linux operating system must be configured so that the SSH daemon does not allow authentication using an empty password. prevents CWE-287
  • V-204442 The Red Hat Enterprise Linux operating system must not have the rsh-server package installed. prevents CWE-287
  • V-251704 The Red Hat Enterprise Linux operating system must not be configured to bypass password requirements for privilege escalation. prevents CWE-862
RHEL 8 (1 rule)
  • V-230492 RHEL 8 must not have the rsh-server package installed. prevents CWE-287
Ubuntu 22.04 (1 rule)
  • V-260470 Ubuntu 22.04 LTS, when booted, must require authentication upon booting into single-user and maintenance modes. prevents CWE-287
Ubuntu 24.04 (2 rules)
  • V-270675 Ubuntu 24.04 LTS when booted must require authentication upon booting into single-user and maintenance modes. prevents CWE-287
  • V-270714 Ubuntu 24.04 LTS must not allow accounts configured in Pluggable Authentication Modules (PAM) with blank or null passwords. prevents CWE-287

References