Skip to content
Heist/ feed
Back to feed
Medium

Security advisory

Type: advisorySources: OSVCVE: CVE-2021-36157

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

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2021-36157
Confirmed fixed CVEs
Not specified
Updated in this feed
31 Oct 2026, 12:04 UTC · Revision 1

Source evidence

CVE-2021-36157

core-osv · Original source

Published 3 Aug 2021, 15:15 UTC

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

osv:CVE-2021-36157
Complete source record
{
  "id": "98e66d2c59fe6df40b9d62392e4c64f891dfba339bb96789ef0898b4323bb989",
  "url": "https://osv.dev/vulnerability/CVE-2021-36157",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "CVE-2021-36157",
    "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.)",
    "evidence": "osv:CVE-2021-36157",
    "products": [],
    "severity": "medium",
    "structured": {
      "id": "CVE-2021-36157",
      "aliases": [
        "CVE-2021-36157",
        "GHSA-jphm-g89m-v42p"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/cortexproject/cortex",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "last_affected": "ed4f3395f8ba0098a827c5ae4ca8a2901674806c"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:linuxfoundation:cortex:*:*:*:*:*:*:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "last_affected": "1.9.0"
                      }
                    ],
                    "source": "CPE_RANGE"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v1.9.0",
            "v1.9.0-rc.0",
            "v0.4.0",
            "v0.3.0-rc.0",
            "v0.2.0",
            "v0.2.0-rc.0",
            "v0.1.0-rc.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-36157.json"
          }
        }
      ],
      "modified": "2026-10-20T10:55:20.108913455Z",
      "provider": "osv",
      "references": [
        "https://grafana.com/docs/grafana/latest/release-notes/",
        "https://github.com/cortexproject/cortex/pull/4375"
      ],
      "provider_metadata": {}
    },
    "related_cves": [
      {
        "value": "CVE-2021-36157",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 387071,
  "published_at": "2021-08-03T15:15:08.667+00:00"
}