Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🐹
🐹 Go
Not in CISA KEV
MEDIUM severity

CVE-2021-36157 — cortex

MEDIUMFix: cortexproject/cortex#4375

CVE-2021-36157 is a medium-severity (CVSS 5.3) Path Traversal vulnerability in github.com/cortexproject/cortex. No vendor fix is recorded yet; mitigation options are listed below.

Path traversal in Grafana Cortex

Also known asGHSA-jphm-g89m-v42p
Published
Updated
Affected
1 pkg
Patched
See advisory
Exploits
None indexed
Exploitation data as of Oct 10, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

EPSS Exploitation Probability

via FIRST.org ↗
1.4%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs72th percentile — riskier than 72% of all scored CVEsHighest risk
0.00%0.63%1.26%1.89%0.2%1.4%Apr 26Aug 26Oct 26

Probability of exploitation in the next 30 days, from FIRST.org EPSS.

How urgent is this, really

CVE-2021-36157 by exploitation likelihood (EPSS) against impact (CVSS). Outside the shaded patch-first corner.

Where this sits among everything scored

Of 385,738 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Counts from FIRST.org, log-scaled.

Real-World Exposure

1 pkg affected
🐹github.com/cortexproject/cortex

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Go packages — download data is not available via public APIs for these ecosystems.

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

Affected Packages

1 total
EcosystemPackageVulnerable rangeFix
🐹Gogithub.com/cortexproject/cortexall versionsNo fix

Affected Products

1 product · 1 configurations
Application
cortexlinuxfoundation
≤ 1.9.0
range

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for github.com/cortexproject/cortex, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Remediation status

    No patched version of github.com/cortexproject/cortex has shipped for CVE-2021-36157 yet. Where your build allows, override or pin the dependency away from the vulnerable range, and apply any maintainer-recommended mitigation.

  3. Mitigate without a patch

    Resolve every user-supplied path to its canonical form and reject anything that escapes the intended directory, and run the component under an account that has no read or write access outside the directory it legitimately serves.

Fixing This On Your OS

If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.

Red HatModerate

CVE-2021-36157 refers to a directory traversal issue in Grafana Cortex, which is neither shipped in Red Hat Enterprise Linux, nor it has any dependency with Grafana package, hence, not-affected.

ProductFixed inAdvisory
Red Hat OpenShift Container Platform 4.13openshift4/ose-cluster-storage-operator:v4.13.0-202305181415.p0.g6479617.assembly.streamRHSA-2023:3304
Red Hat OpenShift Container Platform 4.14openshift4/ose-cluster-storage-operator:v4.14.0-202310201027.p0.gdbb1514.assembly.streamRHSA-2023:5006

Frequently Asked Questions

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.)
O3 Security · Impact-Aware SCA

Is CVE-2021-36157 in your dependencies?

Find it across Go, including transitive dependencies.

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