Bug 2104367 (CVE-2022-31107)

Summary: CVE-2022-31107 grafana: OAuth account takeover
Product: [Other] Security Response Reporter: Avinash Hanwate <ahanwate>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: agerstmayr, amctagga, anpicker, aoconnor, avibelli, bgeorges, bmontgom, bniver, chazlett, clement.escoffier, dandread, dkreling, eparis, flucifre, gmeno, gparvin, grafana-maint, gsmet, hamadhan, jburrell, jkurik, jochrist, jramanat, jwendell, jwon, krathod, lthon, mbenjamin, mgoodwin, mhackett, mszynkie, nathans, njean, nstielau, ovanders, pahickey, peholase, pgallagh, pjindal, probinso, rcernich, rruss, rsvoboda, sbiarozk, sdouglas, 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 9.0.3, Grafana 8.5.9, Grafana 8.4.10, Grafana 8.3.10 Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in Grafana. This flaw allows a malicious user with the authorization to log into a Grafana instance via a configured OAuth IdP to take over an existing Grafana account under certain conditions.
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-08-30 13:33:07 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: 2106923, 2106924, 2106925, 2106926, 2106927, 2106928, 2106929, 2106930, 2106931, 2106932, 2107189, 2107190, 2107191, 2107193, 2107194, 2107195, 2107196, 2107435, 2109066, 2109067, 2109068    
Bug Blocks: 2104176    

Description Avinash Hanwate 2022-07-06 04:34:33 UTC
It is possible for a malicious user who has the authorization to log into a grafana instance via an OAuth integration which provides a login name to take over the account of another user in that Grafana instance provided the following criteria are met:
- the malicious user is authorized to log in to Grafana via OAuth
- the malicious user's external user id is not already associated with an account in Grafana
- the malicious user's email address is not already associated with an account in Grafana
- the malicious user knows the Grafana username or email of the target user

Comment 4 Avinash Hanwate 2022-07-15 04:07:48 UTC
Created grafana tracking bugs for this issue:

Affects: fedora-all [bug 2107435]

Comment 6 Sandipan Roy 2022-07-15 09:32:05 UTC
Upstream Advisory: https://github.com/grafana/grafana/security/advisories/GHSA-mx47-6497-3fv2

Comment 8 errata-xmlrpc 2022-07-26 14:17:04 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.1 Update Services for SAP Solutions

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

Comment 9 errata-xmlrpc 2022-07-26 14:34:33 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9

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

Comment 10 errata-xmlrpc 2022-07-26 14:52:17 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.2 Extended Update Support

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

Comment 11 errata-xmlrpc 2022-07-26 14:57:20 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8.4 Extended Update Support

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

Comment 12 errata-xmlrpc 2022-07-26 15:48:59 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 8

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

Comment 15 Product Security DevOps Team 2022-08-30 13:33:02 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-2022-31107

Comment 16 errata-xmlrpc 2022-11-15 10:06:21 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9

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

Comment 17 errata-xmlrpc 2023-06-15 16:00:14 UTC
This issue has been addressed in the following products:

  Red Hat Ceph Storage 6.1

Via RHSA-2023:3642 https://access.redhat.com/errata/RHSA-2023:3642