{"id":"CVE-2021-36157","aliases":["CVE-2021-36157","GHSA-jphm-g89m-v42p"],"related":[],"kind":"vulnerability","state":"published","title":"Path traversal in Grafana Cortex","summary":"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.)","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.)","source":"cvelist"},{"lang":"es","text":"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)","source":"nvd"}],"published":"2021-08-03T14:03:49.000Z","modified":"2026-06-17T03:58:25.850Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","score":5.3,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub","scheme":"rating","rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","score":5.3,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:N/C:P/I:N/A:N","score":5,"rating":"MEDIUM"}],"cwes":["CWE-22"],"affected":[{"ranges":[{"version":"n/a","status":"affected"}],"source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","lastAffected":"1.9.0"}],"ecosystem":"Go","package":"github.com/cortexproject/cortex","purl":"pkg:golang/github.com/cortexproject/cortex","source":"ghsa"},{"ranges":[{"status":"affected","lastAffected":"1.9.0"}],"vendor":"linuxfoundation","product":"cortex","cpe":"cpe:2.3:a:linuxfoundation:cortex:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://grafana.com/docs/grafana/latest/release-notes/","tags":["release-notes","vendor-advisory","x-refsource-misc","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://github.com/cortexproject/cortex/pull/4375","tags":["patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-36157","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/cortexproject/cortex/commit/d9e1f81f40c607b9e97c2fc6db70ae54679917c4","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/cortexproject/cortex","tags":["package"],"sources":["ghsa"]},{"url":"https://grafana.com/docs/grafana/latest/release-notes","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"mitre","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-36157","url":"https://www.cve.org/CVERecord?id=CVE-2021-36157","licence":"CVE Terms of Use","modified":"2024-08-04T00:47:43.990Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-jphm-g89m-v42p","url":"https://github.com/advisories/GHSA-jphm-g89m-v42p","licence":"CC-BY-4.0","modified":"2023-11-08T04:06:12.475Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-36157","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-36157","licence":"Public domain","modified":"2026-06-17T03:58:25.850Z"}],"updatedAt":"2026-11-25T22:58:02.947Z","epss":{"score":0.01392,"percentile":0.73161,"date":"2026-12-01T12:00:22.000Z"}}