CVE-2021-36157 json
Path traversal in Grafana Cortex
published 2021-08-03 5 y ago modified 2026-06-17 4 mo ago also GHSA-jphm-g89m-v42p , EUVD-2021-2088
- cvss
- 5.3
- version 3.1, NVD
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 1.4%
- EPSS 1.4% chance of exploitation in 30 days, percentile 72%
- public exploits
- 0
- none known
Summary
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.)
Patch / fix
- github.com/cortexproject/cortex@d9e1f81 commit
- github.com/cortexproject/cortex#4375 pull request
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-36157 updated cvss 5.3
cortex: Grafana Cortex directory traversal
-
Red Hat OpenShift Container Platform 4 openshift4/ose-grafanaaffected: no fix planned “Will not fix”
-
Red Hat Openshift Container Storage 4 ocs4/mcg-rhel8-operator, ocs4/ocs-rhel8-operatoraffected: no fix planned “Out of support scope”
-
Red Hat OpenShift Container Platform 4.13 openshift4/ose-cluster-storage-operator v4.13.0-202305181415.p0.g6479617.assembly.streamfixed: vendor fix RHSA-2023:3304
-
Red Hat OpenShift Container Platform 4.14 openshift4/ose-cluster-storage-operator v4.14.0-202310201027.p0.gdbb1514.assembly.streamfixed: vendor fix RHSA-2023:5006
-
Red Hat Logging Subsystem for Red Hat OpenShift openshift-logging/logging-loki-rhel8 Red Hat Advanced Cluster Management for Kubernetes 2 rhacm2/acm-grafana-rhel8, rhacm2/rbac-query-proxy-rhel8, rhacm2/metrics-collector-rhel8, rhacm2/grafana-dashboard-loader-rhel8, endpoint-monitoring-operator-container, rhacm2/multicluster-observability-rhel8-operator 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-selinux Red Hat OpenShift Container Platform 4 openshift4/ose-thanos-rhel9, openshift4/ose-prometheus-operator, openshift4/ose-cluster-monitoring-operator Red Hat OpenShift Container Platform 4.13 openshift4/ose-tests v4.13.0-202305220716.p0.g893ae57.assembly.stream, openshift4/ose-console v4.13.0-202305231941.p0.g6f58e08.assembly.stream, openshift4/ose-installer v4.13.0-202305202341.p0.g2f227cc.assembly.stream, openshift4/ose-sdn-rhel8 v4.13.0-202305180130.p0.gd56dc6a.assembly.stream, openshift4/ose-kube-proxy v4.13.0-202305180130.p0.gd56dc6a.assembly.stream, openshift4/ose-multus-cni v4.13.0-202305232329.p0.g5d283fa.assembly.stream, +46 morenot affected: vulnerable code not present
+2 more productsfewer
Red Hat OpenShift Container Platform 4.14 rhcos 414.92.202310210434-0, openshift4/ose-cli v4.14.0-202310201027.p0.g0c63f9d.assembly.stream, openshift4/ose-pod v4.14.0-202310210404.p0.gf67aeb3.assembly.stream, openshift4/ose-tests v4.14.0-202310201027.p0.g948001a.assembly.stream, openshift4/ose-console v4.14.0-202310201027.p0.gc16ab01.assembly.stream, openshift4/ose-coredns v4.14.0-202310201027.p0.gfd70cf1.assembly.stream, +180 more Red Hat Openshift Data Foundation 4 odf4/mcg-rhel9-operator, odf4/ocs-rhel9-operator, odf4/odf-rhel8-operator
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.39% chance of exploitation in the next 30 days, higher than 72% 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 |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| go | github.com/cortexproject/cortex | <=1.9.0 |
no fix listed |
Classification
- Weakness
-
- CWE-22 Improper Limitation of a Pathname to a Restricted Directory
References
-
github.com
/cortexproject/cortex/pull/4375
web, patch, third-party-advisory
-
github.com
/cortexproject/cortex/commit/d9e1f81f40c607b9e97c2fc6db70ae54679917c4
web
-
grafana.com
/docs/grafana/latest/release-notes/
release-notes, vendor-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2021-36157
advisory
-
github.com
/cortexproject/cortex
package
-
grafana.com
/docs/grafana/latest/release-notes
web
Sources
- CVE List CVE-2021-36157
- GitHub Advisory GHSA-jphm-g89m-v42p
- NVD CVE-2021-36157
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.