# CVE-2021-36157: Path traversal in Grafana Cortex

- Severity: Medium 5.3 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.39%, higher than 73% of CVEs (2026-12-01)
- Published: 2021-08-03T14:03:49.000Z
- Modified: 2026-06-17T03:58:25.850Z
- Also known as: GHSA-jphm-g89m-v42p
- Weaknesses: CWE-22
- Assigned by: mitre

## 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.)

(As written by CVE List.)

## Affected

- Unspecified product: n/a
- github.com/cortexproject/cortex (Go): up to 1.9.0
- linuxfoundation cortex: up to 1.9.0

## Every score

- GitHub: rating Medium
- NVD: CVSS:3.1 5.3 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N`
- NVD: CVSS:2.0 5.0 Medium `AV:N/AC:L/Au:N/C:P/I:N/A: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

- CVE List: [CVE-2021-36157](https://www.cve.org/CVERecord?id=CVE-2021-36157), CVE Terms of Use, modified 2024-08-04
- GitHub Advisory Database: [GHSA-jphm-g89m-v42p](https://github.com/advisories/GHSA-jphm-g89m-v42p), CC-BY-4.0, modified 2023-11-08
- NVD: [CVE-2021-36157](https://nvd.nist.gov/vuln/detail/CVE-2021-36157), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-36157 · Whole record: https://cve.day/CVE-2021-36157.json · Rebuilt by cve.day 2026-11-25T22:58:02.947Z
