5.3medium
Path traversal in Grafana Cortex
- Severity
- 5.3medium CVSS:3.1 by NVD
- Exploit likelihood
- 1.39% (higher than 73% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- mitre
- Also known as
- GHSA-jphm-g89m-v42p
Description
An issue was discovered in Grafana Cortex through 1.9.0. 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 Cortex will attempt to parse a rules file at that location and include some of the contents in the error message. (Other Cortex API requests can also be sent a malicious OrgID header, e.g., tricking the ingester into writing metrics to a different location, but the effect is nuisance rather than information disclosure.)
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Unspecified product | n/a | CVE List |
| github.com/cortexproject/cortex (Go) | up to 1.9.0 | GitHub Advisory Database |
| linuxfoundation cortex | up to 1.9.0 | NVD |
All scores
| GitHub | medium rating | |
| 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 Cortex through 1.9.0. 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 Cortex will attempt to parse a rules file at that location and include some of the contents in the error message. (Other Cortex API requests can also be sent a malicious OrgID header, e.g., tricking the ingester into writing metrics to a different location, but the effect is nuisance rather than information disclosure.)
NVD (es)
Se ha detectado un problema en Grafana Cortex versiones hasta 1.9.0. El valor del encabezado X-Scope-OrgID es usado para diseñar rutas de archivos para los archivos de reglas, y si se diseña para realizar un salto de directorio tal y como ae ../../sensitive/path/in/deployment pathname, Cortex intentará analizar un archivo de reglas en esa ubicación e incluirá parte del contenido en el mensaje de error. (Otras peticiones de la API de Cortex también pueden ser enviados un encabezado OrgID malicioso, por ejemplo, engañando al ingester para que escriba las métricas en una ubicación diferente, pero el efecto es de molestia más que de revelación de información)
References
| https://grafana.com/docs/grafana/latest/release-notes/ | release-notes, vendor-advisory | |
| https://github.com/cortexproject/cortex/pull/4375 | patch, third-party-advisory, web | |
| https://nvd.nist.gov/vuln/detail/CVE-2021-36157 | advisory | |
| https://github.com/cortexproject/cortex/commit/d9e1f81f40c607b9e97c2fc6db70ae54679917c4 | web | |
| https://github.com/cortexproject/cortex | package | |
| https://grafana.com/docs/grafana/latest/release-notes | web | |
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2021-36157 changed 2024-08-04 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-jphm-g89m-v42p changed 2023-11-08 | CC-BY-4.0 |
| NVD | CVE-2021-36157 changed 2026-06-17 | Public domain |