CVE-2021-39226Grafana Authentication Bypass Vulnerability
CVE-2021-39226 is a missing authorization in Grafana, rated high (7.3 on CVSS 3.1).
Why this priority: Exploited in the wild: listed in CISA's KEV catalog.
Published · Updated · NVD status: Analyzed
What it is
An action never checks whether the caller is allowed to perform it. The software does not prove who a caller is, so an attacker can pass as someone else.
How it is reached
An attacker can exploit it over the network, without an account, and nobody has to click anything.
What an attacker gains
The direct impact is limited: partial access to data or a partial outage. In practice, this kind of flaw lets an attacker reach data or actions their role should not allow.
Is it being exploited?
CISA added it to the Known Exploited Vulnerabilities catalog on 2022-08-25: it is being exploited in the wild. It can be exploited automatically, at scale. EPSS estimates a 100% chance of exploitation activity in the next 30 days, higher than 100% of scored CVEs.
What to do
- Treat it as urgent: it is on CISA's KEV list. CISA's deadline for US federal agencies: 2022-09-15.
- Upgrade Grafana to a fixed version for your release line (8.1.6, 7.5.11). The patch notes are linked below.
- Until it is patched, keep it off the internet or behind a VPN, allowlist or authenticating proxy.
- Check exposed instances for signs of compromise, not only for the version.
Description from 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.
What this means for your architecture.
A CVE names a product. Whether it matters depends on where that product sits in your systems: what reaches it, which trust boundary it guards and what it can reach once compromised. Veriom maps your components, their relationships and your trust boundaries from your code, cloud and delivery evidence, so you can see where a component like this sits. The radar itself does not look at your systems.
Components it touches
- Operating systems on servers, workstations or devices. Everything on the host inherits the flaw.
- Permission checks in APIs and admin surfaces. The flaw sits between one role or tenant and another.
- Multi-tenant services. The flaw sits between one role or tenant and another.
- Sign-in, session and token handling. The flaw sits between anonymous callers and authenticated sessions.
Trust boundaries in play
- Internet-facing entry points. No account is needed. Any instance reachable from outside your perimeter, through a load balancer, gateway, VPN or exposed admin port, is in scope.
- Between one role or tenant and another. An attacker who crosses it can reach data or actions their role should not allow.
- Between anonymous callers and authenticated sessions. An attacker who crosses it can act as a signed-in user, or an administrator, without valid credentials.
Questions to answer about your own systems
- Where does Grafana run in your systems, and at which version?
- Which of those instances can be reached from the internet or partner networks?
- What can it reach once compromised: which data stores, secrets and services?
Read more
Patches and commits
Advisories
Releases
Exploits and proofs of concept
Sources
- CVE records and CVSS scores from the NVD CVE API. This product uses the NVD API but is not endorsed or certified by the NVD.
- Exploitation status from CISA’s Known Exploited Vulnerabilities catalog.
- Exploit likelihood from FIRST’s Exploit Prediction Scoring System (EPSS), refreshed daily.
- Explanations are written by Veriom from fixed templates over each record’s data, not by a person reviewing each CVE. Descriptions are quoted from the records as published.