CVE-2021-36157: Grafana Cortex - Path Traversal
- Cve: CVE-2021-36157
- Name: Grafana Cortex - Path Traversal
- 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.)
- Impact: Attackers can access arbitrary files or cause nuisance by manipulating header, potentially leading to information disclosure or service disruption.
- Remediation: Update to version 1.9.1 or later to fix the vulnerability.
- Vulnerability type: path_traversal
- Vulnerability impact: file_system_read, denial_of_service
- Requirement type: none
- Labels source: projectdiscovery
- Severity: medium
- Cvss score: 5.3
- Cvss vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
- Epss score: 0.01392
- Epss percentile: 0.72929
- Assignee: [email protected]
- Published at: 2021-08-03T15:15:08Z
- Age in days: 1939
- Modified at: 2026-06-17T03:58:25Z
- Patch available: yes
- References total: 2
- Products total: 1
- Oss: yes
- Projects total: 1
- Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2021-36157
- Nvd status: modified
- Checked, none or zero: known exploited entries, nuclei templates, public exploits total, public exploits capped, public exploits, rejected by nvd
- Not known: requirements, hackerone
Cwe
| Id | Name |
|---|---|
| CWE-22 | Improper Limitation of a Pathname to a Restricted Directory |
References
| Url | Source | Tags |
|---|---|---|
| https://github.com/cortexproject/cortex/pull/4375 | nvd | Patch, Third Party Advisory |
| https://grafana.com/docs/grafana/latest/release-notes/ | nvd | Release Notes, Vendor Advisory |
Products
| Product | Affected | Platform bound | Sources | Url |
|---|---|---|---|---|
| linuxfoundation:cortex | <= 1.9.0 | no | nvd | /v1/products/linuxfoundation/cortex |
Projects
| Repository | Link kinds | Indexed | Url |
|---|---|---|---|
| cortexproject/cortex | commit, fix, package, pull | yes | /v1/repositories/cortexproject/cortex |
Index
- Repositories: 1
- Packages: 1
- Checked, none or zero: repositories high signal
Exploitation
- Remote: yes
- Checked, none or zero: known exploited, known exploited by, exploitation seen, public exploit, public exploit count, initial access, authentication required
- Not known: known exploited since, vulncheck known exploited since, public exploit first date, nuclei template, initial access since, hackerone reports, exposed hosts