# CVE-2020-12459: Grafana world readable configuration files

> Attackers can read Grafana configuration files to steal secret keys and LDAP bind passwords due to world-readable permissions.

- **Severity:** Medium 5.5 (`CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 29 Apr 2020
- **Updated:** 4 Aug 2024
- **Also known as:** BIT-grafana-2020-12459, GHSA-m25m-5778-fm22, GO-2024-2519, MINI-2hw7-74vj-xvc6, MINI-4727-p7fh-39w3, MINI-76qv-wfwf-v8v2, MINI-7cw7-v9wq-8q77, MINI-8xxj-ww93-cw5j, MINI-9jgw-v2w8-3v4w, MINI-cg7f-2v8q-4m3c, MINI-cr26-h645-v66m, MINI-h843-r55g-xc6v, MINI-m2xf-v6j8-jm49, MINI-mjpc-xj78-24qx, MINI-mjvx-c329-hv7f, MINI-rw4p-gvww-q832, MINI-v7xc-9cpm-xc5p, MINI-x9xh-pg4p-66w4, MINI-xcjq-wr79-m4xw, MINI-xpfx-hr2r-4524

## What is CVE-2020-12459?

CVE-2020-12459 is a medium-severity vulnerability in Fedoraproject Fedora, published on 29 Apr 2020. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

In certain Red Hat packages for Grafana 6.x through 6.3.6, the configuration files /etc/grafana/grafana.ini and /etc/grafana/ldap.toml (which contain a secret_key and a bind_password) are world readable.

Weakness: CWE-732 (Incorrect Permission Assignment for Critical Resource)

## Which versions are affected by CVE-2020-12459?

4 open source packages ship an affected version, including github.com/grafana/grafana and grafana. It affects 2 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/grafana/grafana` | Go | All versions | None |
| `github.com/grafana/grafana` | Go | From 6.0.0-beta1 | 7.2.1 |
| `github.com/grafana/grafana` | Go | From 6.0.0-beta1 | 7.2.1 |
| `grafana` | Bitnami | From 6.0.0 | 6.3.7 |

Products: Fedoraproject Fedora, Grafana Grafana.

## How do I fix CVE-2020-12459?

Upgrade github.com/grafana/grafana to 7.2.1 or later.

## Is CVE-2020-12459 being exploited?

There is no known exploitation of CVE-2020-12459 in the wild and no public exploit code.

## Other vulnerabilities in Fedoraproject Fedora

- [CVE-2024-4577](https://insights.sbomify.com/CVE-2024-4577/): PHP-CGI OS Command Injection (critical 9.8, exploited in the wild)
- [CVE-2021-39226](https://insights.sbomify.com/CVE-2021-39226/): Grafana Authentication Bypass (critical 9.8, exploited in the wild)
- [CVE-2019-5544](https://insights.sbomify.com/CVE-2019-5544/): VMware ESXi and Horizon DaaS OpenSLP Heap-Based Buffer Overflow (critical 9.8, exploited in the wild)
- [CVE-2024-4947](https://insights.sbomify.com/CVE-2024-4947/): Google Chromium V8 Type Confusion (critical 9.6, exploited in the wild)
- [CVE-2024-4671](https://insights.sbomify.com/CVE-2024-4671/): Google Chromium Visuals Use-After-Free (critical 9.6, exploited in the wild)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2020-12459 and fix it if it is affected.

What it is: CVE-2020-12459 is a medium-severity vulnerability in Fedoraproject Fedora, published on 29 Apr 2020. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2020-12459 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/grafana/grafana (Go): affected all versions; no fix listed
- github.com/grafana/grafana (Go): affected from 6.0.0-beta1; fixed in 7.2.1
- github.com/grafana/grafana (Go): affected from 6.0.0-beta1; fixed in 7.2.1
- grafana (Bitnami): affected from 6.0.0; fixed in 6.3.7

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2020-12459/ (Markdown: https://insights.sbomify.com/CVE-2020-12459/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2020-12459
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2020-12459
- OSV: https://osv.dev/vulnerability/CVE-2020-12459

---
From sbomify Insights: https://insights.sbomify.com/CVE-2020-12459/
Summaries are generated and may contain mistakes; the official description above is the record.
