CVE-2021-36157
MEDIUM 5.3CVSS 3.1Path traversal in Grafana Cortex
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.)
- Published
- 3 Aug 2021
- Last modified
- 17 Jun 2026
- Assigned by
- cve@mitre.org
- NVD status
- Modified
- Weakness
- CWE-22
- Also known as
- GHSA-jphm-g89m-v42p
- Sources
- NVDJSONOSV GHSA-jphm-g89m-v42pJSON
Scores
| Source | Scored by | Version | Score | Vector / decision |
|---|---|---|---|---|
| NVD | nvd@nist.gov (Primary) | CVSS 3.1 | MEDIUM 5.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N |
| NVD | nvd@nist.gov (Primary) | CVSS 2.0 | MEDIUM 5.0 | AV:N/AC:L/Au:N/C:P/I:N/A:N |
Affected
| Source | Vendor / ecosystem | Product / package | Affected versions | Fixed in |
|---|---|---|---|---|
| NVD | linuxfoundation | cortexcpe:2.3:a:linuxfoundation:cortex:*:*:*:*:*:*:*:* |
<= 1.9.0 | |
| OSV | Go | github.com/cortexproject/cortex | <= 1.9.0 |
References
- https://github.com/cortexproject/cortex/pull/4375 · Patch, Third Party Advisory, WEB
- https://grafana.com/docs/grafana/latest/release-notes/ · Release Notes, Vendor 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
History
- 25 Nov 2026 20:33 UTC · NVD: first stored (published 3 Aug 2021)
- 25 Nov 2026 20:13 UTC · OSV: first stored (published 2 Sep 2021)