# CVE-2021-36156: Path traversal in Grafana Loki

- 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): 2.55%, higher than 85% of CVEs (2026-12-01)
- Published: 2021-08-03T14:12:11.000Z
- Modified: 2026-08-07T08:12:26.278Z
- Also known as: GHSA-grj5-8x6q-hc9q
- Weaknesses: CWE-22
- Assigned by: mitre

## Description

An issue was discovered in Grafana Loki through 2.2.1. 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 Loki will attempt to parse a rules file at that location and include some of the contents in the error message.

(As written by CVE List.)

## Affected

- Unspecified product: n/a
- github.com/grafana/loki (Go): before 2.3.0
- grafana loki: up to 2.2.1

## Every score

- GitHub: 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: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://github.com/grafana/loki/pull/4020#issue-694377133> (issue-tracking, third-party-advisory, web)
- <https://github.com/grafana/loki/releases/tag/v2.3.0> (patch, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-36156> (advisory)
- <https://github.com/grafana/loki/pull/4020> (web)
- <https://github.com/grafana/loki> (package)

## Sources

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

---

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