CVE-2021-36157
JSON

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 packageVersionsReported by
Unspecified productn/aCVE List
github.com/cortexproject/cortex (Go)up to 1.9.0GitHub Advisory Database
linuxfoundation cortexup to 1.9.0NVD

All scores

GitHubmedium rating
NVD5.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
NVD5.0medium CVSS:2.0AV: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

Sources

SourceRecordLicence
CVE ListCVE-2021-36157 changed 2024-08-04CVE Terms of Use
GitHub Advisory DatabaseGHSA-jphm-g89m-v42p changed 2023-11-08CC-BY-4.0
NVDCVE-2021-36157 changed 2026-06-17Public domain