Patchfirst
CVE-2021-39226 KEVPublic exploit High · 7.3 EPSS 99.9%

Grafana Authentication Bypass Vulnerability

Grafana Labs · Grafana

Summary

A flaw in Grafana's snapshot feature, part of the Grafana open source data visualization platform, lets users access and delete snapshots they should not be able to reach, through the /dashboard/snapshot/:key, /api/snapshots/:key and /api/snapshots-delete/:deleteKey paths. An unauthenticated attacker over the network can view and, if the public_mode setting is enabled, delete the lowest-keyed snapshot without any credentials or user interaction, while any authenticated user can delete it regardless of that setting, and repeated access allows a full walk through all snapshot data.

Official description · NVD

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 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.

Breakdown
68.1 / 100
Exploited
Yes, in CISA KEV
Reports
0
Tactics
2/15

How an attack unfolds

Based on mappings. Select a step to see the evidence.
  1. How attackers get in

  2. What they do

First seen exploited 10 months after disclosure.

  1. Disclosedday 0
  2. First seen exploitedVulnCheck KEV evidence+10 mo
  3. Added to CISA KEVEU database agrees+11 mo

CISA KEV listing is when exploitation was confirmed, not necessarily the first attack.

See the family tree

2 related vulnerabilities in the same code over 16 months. The latest fix listed for github.com/grafana/grafana is 8.3.5.

Same bug familyLinked by evidence that a fix failed or the same code was patched again. Oldest first.

  1. This CVECVE-2021-39226Grafana Authentication Bypass5 Oct 2021KEV
  2. relatedMedium

    Why these are linked:

    CVE-2022-39324Grafana vulnerable to spoofing originalUrl of snapshots27 Jan 2023

Fixes in github.com/grafana/grafanaGo package, by fixed version. Earlier and later fixes in the same package, not necessarily the same bug.

  1. 7.2.1CVE-2020-1245829 Apr 2020
  2. 7.2.1CVE-2020-1245929 Apr 2020
  3. 7.4.2CVE-2021-2735818 Mar 2021
  4. 8.1.6CVE-2021-392265 Oct 2021KEV
  5. 8.2.4CVE-2021-4124415 Nov 2021
  6. 8.3.1CVE-2021-437987 Dec 2021KEV
  7. 8.3.2CVE-2021-4381510 Dec 2021
  8. 8.3.5CVE-2022-217028 Feb 2022
  9. 8.3.5CVE-2022-217138 Feb 2022Latest listed

techniques

2 , grouped by in kill-chain order 2

Initial AccessTA0001

MITRE CTID mapping of the KEV entry · how it is exploited

This authentication bypass vulnerability is exploited by both unauthenticated and authenticated adversaries via the snapshot feature in Grafana. Attackers have leveraged this vulnerability to access and manipulate snapshot data, potentially leading to unauthorized data exposure and loss. Exploitation techniques have not been publicly published. In exploitation scenarios, adversaries can view snapshots with the lowest database key by accessing specific paths, such as /dashboard/snapshot/:key or /api/snapshots/:key. If the "public_mode" configuration is set to true, unauthenticated users can also delete these snapshots using the path /api/snapshots-delete/:deleteKey. This capability allows attackers to enumerate and delete snapshot data, resulting in complete data loss.

ImpactTA0040

MITRE CTID mapping of the KEV entry · primary impact

Detection

0 rules for this CVE · 169 general rules for its techniques

Rules for this CVE

0 that reference CVE-2021-39226 directly.

CVE-specific rules are not available in this build. Search SigmaHQ ↗

Sigma rules © SigmaHQ, Detection Rule License 1.1; linked, not reproduced.

Am I affected? What do I upgrade to?

From GitHub Security Advisories and OSV

1 package in 1 ecosystem. Main package: github.com/grafana/grafana.

Gogithub.com/grafana/grafanaGHSA-69j6-29vr-p3j9

Upgrade to 8.3.10

Fixes this CVE and 1 other known vulnerability in this package (CVE-2021-43798).

Still affected on this line by CVE-2022-31097 (no fix published); CVE-2024-9264 (no fix published); CVE-2025-3415 (no fix published); CVE-2025-4123 (no fix published); CVE-2025-6023 (no fix published).

Gogo get github.com/grafana/grafana@v8.3.10

First fixed in 8.1.6 for CVE-2021-39226.

Affected versions, by release line

If you runUpgrade to
8.0.0 up to 8.1.68.3.10first fix for this CVE: 8.1.6
All versions before 7.5.11

Still affected on this line by CVE-2022-31097 (no fix published); CVE-2024-9264 (no fix published); CVE-2025-3415 (no fix published); CVE-2025-4123 (no fix published); CVE-2025-6023 (no fix published).

7.5.11

“Up to” means the second version is the fix and is not affected.

Check your lockfile against all CVEs

What security researchers reported

Not named in any threat report yet

Also mentioned in 50 community threat pulses (AlienVault OTX)

Weaker evidence

Pulses are indicator collections that anyone can publish. A mention is not confirmation of exploitation.

References

9 links, grouped by NVD tag (8 duplicates merged)
↑ ↓ chooseEnter openEsc close