CVE-2021-43815 Grafana directory traversal for `.cvs` files
Authenticated attackers can read arbitrary CSV files via directory traversal in Grafana when the TestData DB data source is enabled.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2021-43815?
CVE-2021-43815 is a medium-severity path traversal vulnerability in Grafana Grafana, published on 10 Dec 2021. Any signed-in user can exploit it over the network, with no action from the victim.
Official description
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.
Weakness: CWE-22
Which versions are affected by CVE-2021-43815?
3 open source packages ship an affected version, including github.com/grafana/grafana and grafana. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
github.com/grafana/grafana Go | From 8.0.0-beta3 | 8.3.2 |
github.com/grafana/grafana Go | From 8.0.0-beta3 | 8.3.2 |
grafana Bitnami | All versions | 7.5.12, 8.3.2 |
Linux distribution packages (1)
grafana openSUSE:Tumbleweed | All versions | 10.1.5-2.1 |
Products include Grafana Grafana.
How do I fix CVE-2021-43815?
Upgrade github.com/grafana/grafana to 8.3.2 or later.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is CVE-2021-43815 being exploited?
There is no known exploitation of CVE-2021-43815 in the wild and no public exploit code.
Other vulnerabilities in Grafana Grafana
Sources
Also known as BIT-grafana-2021-43815, GHSA-7533-c8qv-jm9m, UBUNTU-CVE-2021-43815, openSUSE-SU-2024:13586-1.