Bug 2125514 (CVE-2022-35957)

Summary: CVE-2022-35957 grafana: Escalation from admin to server admin when auth proxy is used
Product: [Other] Security Response Reporter: Avinash Hanwate <ahanwate>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: unspecifiedCC: agerstmayr, anstephe, aoconnor, avibelli, bgeorges, bniver, btarraso, chazlett, clement.escoffier, dandread, dkreling, flucifre, gmeno, go-sig, gparvin, grafana-maint, gsmet, hamadhan, jburrell, jkurik, jochrist, jramanat, jwendell, jwon, lthon, mbenjamin, mgoodwin, mhackett, mszynkie, nathans, njean, pahickey, peholase, pgallagh, pjindal, probinso, rcernich, rruss, rsvoboda, sbiarozk, sdouglas, security-response-team, sostapov, stcannon, twalsh, vereddy, vkumar
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: grafana 9.1.6, grafana 9.0.9, grafana 8.5.13 Doc Type: If docs needed, set a value
Doc Text:
A flaw was found in the grafana package. Auth proxy allows authentication of a user by only providing the username (or email) in an X-WEBAUTH-USER HTTP header. The trust assumption is that a front proxy will take care of authentication and that the Grafana server is only publicly reachable with this front proxy.
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-05-09 15:14:34 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: 2125522, 2125523, 2125524, 2125525, 2125526, 2125527, 2125528, 2125529, 2125530, 2126033, 2126034, 2126035, 2126036, 2126265, 2126266, 2126267, 2126268, 2128565    
Bug Blocks: 2125519    

Description Avinash Hanwate 2022-09-09 08:17:33 UTC
Auth proxy allows to authenticate a user by only providing the username (or email) in an X-WEBAUTH-USER HTTP header: the trust assumption is that a front proxy will take care of authentication and that the Grafana server is publicly reachable only with this front proxy.

Datasource proxy breaks this assumption:
- It is possible to configure a fake datasource pointing to a localhost Grafana install with an X-WEBAUTH-USER HTTP header containing the admin username
- This fake datasource can be called publicly via this proxying feature

Comment 11 Avinash Hanwate 2022-09-21 04:56:32 UTC
Created grafana tracking bugs for this issue:

Affects: fedora-all [bug 2128565]

Comment 25 errata-xmlrpc 2023-05-09 07:13:39 UTC
This issue has been addressed in the following products:

  Red Hat Enterprise Linux 9

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

Comment 26 Product Security DevOps Team 2023-05-09 15:14:29 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-35957

Comment 27 errata-xmlrpc 2023-06-15 16:00:58 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