Skip to content
Server Security Center
KEVhigh7.3

CVE-2021-39226: Grafana Authentication Bypass

Grafana Labs Grafana · listed in the CISA catalog of actively exploited vulnerabilities since 2022-08-25.

CVSS v3.1 (CVE record)
7.3
high
EPSS (exploit probability, 30 days)
99.9%
among the highest 0.1% of all CVEs
Added to CISA KEV
2022-08-25
US federal due date 2022-09-15
Ubuntu priority
high

CVE-2021-39226 explained

CVE-2021-39226 is an authentication bypass in Grafana's snapshot feature. Unauthenticated and authenticated users can view the snapshot with the lowest database key, and authenticated users can delete it. Combining viewing and deletion allows walking through all snapshot data while destroying it. CISA lists this flaw as known to be exploited.

Impact

A remote attacker without credentials can read snapshot data over the network with no user interaction. If the snapshot "public_mode" setting is true (default is false), unauthenticated users can also delete snapshots. Authenticated users can delete snapshots regardless of that setting. Repeated viewing and deletion exposes every snapshot and leads to complete snapshot data loss. The impact on confidentiality, integrity and availability is rated low each.

Who is affected

The facts list one affected release: Ubuntu 16.04 LTS, source package grafana from the standard archive. No fixed version is published for it, and the release is end of life. Upstream, Grafana Labs resolved the issue in versions 8.1.6 and 7.5.11.

Written with AI from the data on this page and checked against it automatically.

Official description

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.

CISA required action: Apply updates per vendor instructions.

CISA notes

Upstream versions (CVE record)

From the CVE record published by the vendor or CVE numbering authority.

  • grafana
    Affected
    • < 7.5.11
    • ≥ 8.0.0
    • < 8.1.6
    Fixed in
    not stated

Ubuntu and Debian releases

A server is vulnerable if it has a package built from the listed source package installed in a version lower than the fixed version for its release.

What to do

  1. Identify all hosts running Grafana, including the grafana package on Ubuntu 16.04 LTS.
  2. Upgrade Grafana to 8.1.6, 7.5.11 or a later fixed version, following the vendor instructions.
  3. Move systems off Ubuntu 16.04 LTS to a supported release, since it is end of life.
  4. Restart the Grafana service after updating so the fixed code runs.
  5. Keep the snapshot "public_mode" setting at its default of false.
  6. Review snapshots for unexpected loss and restrict network access to Grafana.

Ubuntu 16.04 LTS is end of life and has no fixed grafana package. Plan an upgrade to a supported release or a fixed upstream Grafana version. Until then, use a reverse proxy or similar to block the snapshot paths named in the advisory: /api/snapshots/:key, /api/snapshots-delete/:deleteKey and /dashboard/snapshot/:key. The vendor states they have no normal function and can be blocked without side effects.

Written with AI from the data on this page and checked against it automatically.

Check and fix on a server

Run on each Ubuntu or Debian server. Replace grafana with the source package from the table above.

1. Show installed packages built from the source package, with their versions

dpkg-query -W -f='${binary:Package} ${Version} ${source:Package}\n' | awk '$3=="grafana"'

No fixed version available

No Ubuntu or Debian release has published a fixed version of grafana yet, so every installed version is affected. Until a fix is published:

  • Follow the vendor's advisory for a mitigation or patch: github.com/grafana/grafana/security/advisories/GHSA-69j6-…
  • If the server does not need the package, remove it, or replace it with a maintained alternative.
  • Restrict exposure: keep the affected service off the internet, limit access with a firewall or VPN, and turn off the vulnerable feature where you can.

This page updates automatically when Ubuntu or Debian publish a fix.

Ubuntu 16.04 LTS has reached end of life and no longer gets regular security fixes – upgrade to a supported release.

CISA's assessment (SSVC)

Exploitation
Exploited in the wild
Automatable
Yes – attackers can automate it at scale
Technical impact
Total – full control of the component or total information disclosure

Weakness: CWE-287 Improper Authentication

Questions about CVE-2021-39226

Do attackers need an account to exploit this?
No. Unauthenticated users can view snapshot data. Deletion without authentication requires the snapshot "public_mode" setting to be true. Authenticated users can delete snapshots regardless of that setting.
Is this vulnerability exploited in practice?
Yes. CISA added it to its Known Exploited Vulnerabilities catalog on 2022-08-25. The required action is to apply updates per vendor instructions. Known ransomware use is listed as unknown.
Will a fix arrive for Ubuntu 16.04 LTS?
No fixed version is published, and the release is end of life. Do not wait for a fix. Upgrade to a supported release or a fixed Grafana version, and block the affected snapshot paths in the meantime.

Written with AI from the data on this page and checked against it automatically.

References

Data: CISA Known Exploited Vulnerabilities (public domain) · CVE Program records incl. CISA ADP enrichment · OSV.dev (CC BY 4.0) incl. Ubuntu and Debian security data · FIRST EPSS · endoflife.date. Updated automatically – facts last changed 2026-11-22. Always confirm with the vendor's or distribution's advisory before patching.