Bug 2032574 (CVE-2021-43815)

Summary: CVE-2021-43815 grafana: directory traversal for .csv files
Product: [Other] Security Response Reporter: Guilherme de Almeida Suckevicz <gsuckevi>
Component: vulnerabilityAssignee: Nobody <nobody>
Status: NEW --- QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: agerstmayr, anharris, anpicker, bdettelb, bmontgom, bniver, crarobin, eparis, fjansen, flucifre, gmeno, gparvin, grafana-maint, hvyas, jburrell, jkurik, jmadigan, jwendell, mbenjamin, mhackett, nathans, ngough, njean, nstielau, pahickey, pamccart, rcernich, saroy, sostapov, spasquie, sponnaga, stcannon, twalsh, vereddy, vkumar
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: grafana 8.3.2 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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: 2035272, 2032575, 2033234    
Bug Blocks: 2031229    

Description Guilherme de Almeida Suckevicz 2021-12-14 18:12:59 UTC
Grafana is an open-source platform for monitoring and observability. Grafana prior to versions 8.3.2 and 7.5.12 has a directory traversal for arbitrary .csv files. It only affects instances that have the developer testing tool called TestData DB data source enabled and configured. The vulnerability is limited in scope, and only allows access to files with the extension .csv to authenticated users only. Grafana Cloud instances have not been affected by the vulnerability. Versions 8.3.2 and 7.5.12 contain a patch for this issue. There is a workaround available for users who cannot upgrade. Running a reverse proxy in front of Grafana that normalizes the PATH of the request will mitigate the vulnerability. The proxy will have to also be able to handle url encoded paths.

https://github.com/grafana/grafana/security/advisories/GHSA-7533-c8qv-jm9m
https://grafana.com/blog/2021/12/10/grafana-8.3.2-and-7.5.12-released-with-moderate-severity-security-fix/
http://www.openwall.com/lists/oss-security/2021/12/10/4

Upstream patches:
https://github.com/grafana/grafana/commit/fd48aee61e4328aae8d5303a9efd045fa0ca308d
https://github.com/grafana/grafana/commit/d6ec6f8ad28f0212e584406730f939105ff6c6d3

Comment 1 Guilherme de Almeida Suckevicz 2021-12-14 18:13:15 UTC
Created grafana tracking bugs for this issue:

Affects: fedora-all [bug 2032575]