5.3medium
Path traversal in Grafana Loki
- Severity
- 5.3medium CVSS:3.1 by NVD
- Exploit likelihood
- 2.55% (higher than 85% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- mitre
- Also known as
- GHSA-grj5-8x6q-hc9q
Description
An issue was discovered in Grafana Loki through 2.2.1. The header value X-Scope-OrgID is used to construct file paths for rules files, and if crafted to conduct directory traversal such as ae ../../sensitive/path/in/deployment pathname, then Loki will attempt to parse a rules file at that location and include some of the contents in the error message.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Unspecified product | n/a | CVE List |
| github.com/grafana/loki (Go) | before 2.3.0 | GitHub Advisory Database |
| grafana loki | up to 2.2.1 | NVD |
All scores
| GitHub | 5.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N |
| NVD | 5.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N |
| NVD | 5.0medium CVSS:2.0 | AV:N/AC:L/Au:N/C:P/I:N/A:N |
Classification
What each source says
CVE List
An issue was discovered in Grafana Loki through 2.2.1. The header value X-Scope-OrgID is used to construct file paths for rules files, and if crafted to conduct directory traversal such as ae ../../sensitive/path/in/deployment pathname, then Loki will attempt to parse a rules file at that location and include some of the contents in the error message.
NVD (es)
Se ha detectado un problema en Grafana Loki versiones hasta 2.2.1. El valor del encabezado X-Scope-OrgID es usado para diseñar las rutas de los archivos de reglas, y si se diseña para realizar un salto de directorio como ae ../../sensitive/path/in/deployment pathname, Loki intentará entonces analizar un archivo de reglas en esa ubicación e incluirá parte del contenido en el mensaje de error
References
| https://github.com/grafana/loki/pull/4020#issue-694377133 | issue-tracking, third-party-advisory, web | |
| https://github.com/grafana/loki/releases/tag/v2.3.0 | patch, third-party-advisory, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2021-36156 | advisory | |
| https://github.com/grafana/loki/pull/4020 | web | |
| https://github.com/grafana/loki | package | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2021-36156 changed 2024-08-04 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-grj5-8x6q-hc9q changed 2026-08-07 | CC-BY-4.0 |
| NVD | CVE-2021-36156 changed 2026-06-17 | Public domain |