CVE-2021-39226Grafana Labs Grafana
Authentication Bypass and Unauthorized Snapshot Access in Grafana
High 7.3 KEV No auth neededHigh EPSS
Follow: this CVE · Grafana Labs · Grafana Labs Grafana We alert you by email or Slack (account required).
- Priority
- 69
- CVSS 3.1
- 7.3
- EPSS
- 99.9% probability of exploitation in 30 days · percentile 100
- Auth required
- No
- In KEV since
- Aug 25, 2022
- CISA deadline
- Sep 15, 2022
- Ransomware use
- Unknown
- Published
- Oct 5, 2021
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- SSVC (CISA)
- Exploitation: active · Automatable: yes · Technical impact: total
- Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
What happens
Grafana versions before 7.5.11 and 8.0.0-8.1.5 allow unauthenticated and authenticated users to access and delete snapshots through specific API paths. Attackers can view and delete all snapshot data, resulting in complete data loss. CISA confirmed this vulnerability as exploited in the wild.
Show the original NVD text
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.
Exploitation confirmed by CISA
Grafana contains an authentication bypass vulnerability that allows authenticated and unauthenticated users to view and delete all snapshot data, potentially resulting in complete snapshot data loss.
Action required by CISA: Apply updates per vendor instructions.
What to do
Patch available · fixed versions: 7.5.11, 8.1.6
Update Grafana to version 7.5.11 or 8.1.6 as applicable. If unable to update, block access to paths /api/snapshots/:key, /api/snapshots-delete/:deleteKey, /dashboard/snapshot/:key using a reverse proxy.
- Apply the vendor's security update for Grafana.
- CISA has confirmed it is exploited: treat it as urgent. The deadline for US federal agencies was September 15, 2022.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
- Check logs for signs of earlier exploitation.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| Go | github.com/grafana/grafana |
< 7.5.11 |
7.5.11 |
go get github.com/grafana/grafana@v7.5.11 |
| Go | github.com/grafana/grafana |
≥ 8.0.0 < 8.1.6 |
8.1.6 |
go get github.com/grafana/grafana@v8.1.6 |
Per OSV / GitHub Advisories (GHSA-69j6-29vr-p3j9). Check the version in your lockfile before upgrading.
Affected products (CPE)
| Vendor | Product | Versions |
|---|---|---|
| grafana | grafana | < 7.5.11 |
| grafana | grafana | ≥ 8.0.0 < 8.1.6 |
| fedoraproject | fedora | 34 |
| fedoraproject | fedora | 35 |
Official sources
References
Links published by the sources. Open them with care.
- www.openwall.com Mailing List Third Party Advisory
- github.com Patch
- github.com Exploit Mitigation Vendor Advisory
- grafana.com Release Notes
- grafana.com Release Notes
- lists.fedoraproject.org Broken Link
- lists.fedoraproject.org Broken Link
- security.netapp.com Third Party Advisory
- www.cisa.gov US Government Resource