Bug 2011063 (CVE-2021-39226)

Summary: CVE-2021-39226 grafana: Snapshot authentication bypass
Product: [Other] Security Response Reporter: Pedro Sampaio <psampaio>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: agerstmayr, alegrand, amctagga, amuller, anharris, anpicker, aos-bugs, bmontgom, bniver, cperry, dahernan, eparis, erooth, flucifre, gghezzo, gmeno, gparvin, grafana-maint, hvyas, jburrell, jokerman, jramanat, jwendell, kconner, lnacshon, mbenjamin, mhackett, nathans, nstielau, pahickey, puebele, rcernich, security-response-team, sostapov, spasquie, sponnaga, stcannon, twalsh, vereddy, vkumar
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: grafana 7.5.11, grafana 8.1.6 Doc Type: If docs needed, set a value
Doc Text:
An authentication bypass was found in grafana. An attacker on the network is able to view and delete snapshots by accessing a literal path.
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-10-12 14:08:23 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 2011398, 2011399, 2011400, 2011401, 2011501, 2011503, 2011606, 2011607, 2011608, 2011609, 2011849, 2011979, 2012164, 2012165    
Bug Blocks: 2011064    

Description Pedro Sampaio 2021-10-05 21:21:14 UTC
In affected versions of Grafana, 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.

References:

https://github.com/grafana/grafana/commit/2d456a6375855364d098ede379438bf7f0667269
https://grafana.com/docs/grafana/latest/release-notes/release-notes-8-1-6/
https://github.com/grafana/grafana/security/advisories/GHSA-69j6-29vr-p3j9
https://grafana.com/docs/grafana/latest/release-notes/release-notes-7-5-11/

Comment 9 Stefan Cornelius 2021-10-08 13:25:35 UTC
Created grafana tracking bugs for this issue:

Affects: fedora-all [bug 2012164]

Comment 12 errata-xmlrpc 2021-10-12 10:44:03 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.1 Extended Update Support

Via RHSA-2021:3769 https://access.redhat.com/errata/RHSA-2021:3769

Comment 13 errata-xmlrpc 2021-10-12 10:47:26 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.2 Extended Update Support

Via RHSA-2021:3770 https://access.redhat.com/errata/RHSA-2021:3770

Comment 14 errata-xmlrpc 2021-10-12 10:53:05 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

Via RHSA-2021:3771 https://access.redhat.com/errata/RHSA-2021:3771

Comment 15 Product Security DevOps Team 2021-10-12 14:08:23 UTC
This bug is now closed. Further updates for individual products will be reflected on the CVE page(s):

https://access.redhat.com/security/cve/cve-2021-39226

Comment 16 Avinash Hanwate 2021-12-08 08:20:30 UTC
*** Bug 2029998 has been marked as a duplicate of this bug. ***

Comment 17 errata-xmlrpc 2022-03-10 16:02:01 UTC
This issue has been addressed in the following products:

  Red Hat OpenShift Container Platform 4.10

Via RHSA-2022:0056 https://access.redhat.com/errata/RHSA-2022:0056

Comment 22 errata-xmlrpc 2022-09-07 14:30:09 UTC
This issue has been addressed in the following products:

  Red Hat OpenShift Container Platform 3.11

Via RHSA-2022:6252 https://access.redhat.com/errata/RHSA-2022:6252

Comment 24 errata-xmlrpc 2022-09-09 05:14:47 UTC
This issue has been addressed in the following products:

  Red Hat OpenShift Container Platform 4.6

Via RHSA-2022:6262 https://access.redhat.com/errata/RHSA-2022:6262

Comment 25 errata-xmlrpc 2022-09-12 12:22:08 UTC
This issue has been addressed in the following products:

  Red Hat OpenShift Container Platform 4.9

Via RHSA-2022:6317 https://access.redhat.com/errata/RHSA-2022:6317

Comment 26 errata-xmlrpc 2022-09-13 13:53:29 UTC
This issue has been addressed in the following products:

  Red Hat OpenShift Container Platform 4.7

Via RHSA-2022:6322 https://access.redhat.com/errata/RHSA-2022:6322

Comment 28 errata-xmlrpc 2022-09-14 20:38:32 UTC
This issue has been addressed in the following products:

  Red Hat OpenShift Container Platform 4.8

Via RHSA-2022:6308 https://access.redhat.com/errata/RHSA-2022:6308