Actively exploited · Published Oct 5, 2021 · Assigned by GitHub_M
CVE-2021-39226Snapshot authentication bypass in grafana
Critical 9.8 Exploited
In plain English
A critical-severity improper authentication in grafana from grafana. Attackers are actively exploiting it in the wild (listed by CISA on August 25, 2022). The chance it is exploited in the next 30 days is estimated at 99.9% (higher than 99.9% of all known vulnerabilities). Ready-made attack tooling exists: Nuclei. Fixed versions are available - upgrade the affected package.
CISA guidance
Apply updates per vendor instructions.
Federal agencies must remediate by Sep 15, 2022.
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.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Go | github.com/grafana/grafana | 7.5.11 | GHSA-69j6-29vr-p3j9 |
| Go | github.com/grafana/grafana | 8.1.6 | GHSA-69j6-29vr-p3j9 |
| Rocky Linux:8 | grafana | 0:7.3.6-3.el8_4 | RLSA-2021:3771 |
Affected products (as reported)
Weakness: CWE-287 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
References
- https://github.com/grafana/grafana/security/advisories/GHSA-69j6-29vr-p3j9 x_refsource_CONFIRM
- https://github.com/grafana/grafana/commit/2d456a6375855364d098ede379438bf7f0667269 x_refsource_MISC
- https://grafana.com/docs/grafana/latest/release-notes/release-notes-7-5-11/ x_refsource_MISC
- https://grafana.com/docs/grafana/latest/release-notes/release-notes-8-1-6/ x_refsource_MISC
- [oss-security] 20211005 CVE-2021-39226 Grafana snapshot authentication bypass mailing-list, x_refsource_MLIST
- FEDORA-2021-dd83dc8b0b vendor-advisory, x_refsource_FEDORA
- https://security.netapp.com/advisory/ntap-20211029-0008/ x_refsource_CONFIRM
- FEDORA-2021-01588ab0bf vendor-advisory, x_refsource_FEDORA
- https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2021-39226 government-resource