CVE-2021-36156 json
Path traversal in Grafana Loki
published 2021-08-03 5 y ago modified 2026-08-07 3 mo ago also GHSA-grj5-8x6q-hc9q , EUVD-2021-2065
- cvss
- 5.3
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.5%
- EPSS 1.5% chance of exploitation in 30 days, percentile 74%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- go github.com/grafana/loki 2.3.0
- loki Arch Linux 2.3.0-1
arch linux advisories AVG-2250
- github.com/grafana/loki#4020 pull request
- github.com/grafana/loki/releases/tag/v2.3.0 release
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2021-36156 updated cvss 5.3
loki: Path traversal in Grafana Loki
-
Red Hat OpenShift Service Mesh 2.1 servicemesh-grafana Red Hat OpenShift Container Platform 4 openshift4/ose-grafanaaffected: no fix planned “Will not fix”
-
Red Hat Logging Subsystem for Red Hat OpenShift openshift-logging/loki-rhel8-operator Red Hat Advanced Cluster Management for Kubernetes 2 rhacm2/acm-grafana-rhel8 Red Hat Enterprise Linux 8 grafana, grafana-loki, grafana-mssql, grafana-mysql, grafana-selinux, grafana-graphite, +8 more Red Hat Enterprise Linux 9 grafana, grafana-selinuxnot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
Exploit prediction
1.48% chance of exploitation in the next 30 days, higher than 74% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| NVD | 3.1 | 5.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N |
| NVD | 2.0 | 5.0 | AV:N/AC:L/Au:N/C:P/I:N/A:N |
| GitHub | 3.1 | 5.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| go | github.com/grafana/loki | <2.3.0 |
2.3.0 |
Classification
- Weakness
-
- CWE-22 Improper Limitation of a Pathname to a Restricted Directory
References
-
github.com
/grafana/loki/pull/4020#issue-694377133
web, issue-tracking, third-party-advisory
-
github.com
/grafana/loki/releases/tag/v2.3.0
web, patch, third-party-advisory
-
github.com
/grafana/loki/pull/4020
web
-
nvd.nist.gov
/vuln/detail/CVE-2021-36156
advisory
-
github.com
/grafana/loki
package
Sources
- CVE List CVE-2021-36156
- GitHub Advisory GHSA-grj5-8x6q-hc9q
- NVD CVE-2021-36156
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.