CVEfocus › CVE database › CVE-2021-39226

CVE-2021-39226Snapshot authentication bypass in grafana

Known exploited (CISA KEV)CVSS 9.8 CriticalEPSS 99.9% (in the top 1% of all CVEs)Published 2021-10-05Updated 2025-10-21Assigner: GitHub_M

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.

CWE-287

What to do

This CVE is being exploited in the wild (CISA Known Exploited Vulnerabilities, added 2022-08-25). If you run an affected version, patch or mitigate now.

Fixed builds are available from Go, Red Hat, Rocky Linux: see the table below for the fixed version per release.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

3Fixed
1Will not fix
2Not affected

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 16.04grafanaWill not fix
I'm guessing https://github.com/grafana/grafana/commit/329f96db1a507378a5d8ba0de685a0f0ae3ce0e0 is the fix, though nothing in the commit says that it is.…
UBUNTU-CVE-2021-39226
Red Hat Enterprise Linux 9grafanaNot affected
Red Hat Enterprise Linux 9grafana-selinuxNot affected
Red Hat Enterprise Linux 8grafanaFixed0:7.3.6-3.el8_4RHSA-2021:3771
Rocky Linux 8grafanaFixed0:7.3.6-3.el8_4RLSA-2021:3771
Go librarygithub.com/grafana/grafanaFixed8.1.6GHSA-69j6-29vr-p3j9

What the vendor says

As published in the CVE record by GitHub_M, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

Vendor advisories:

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.