{"id":"CVE-2021-36157","aliases":["EUVD-2021-2088","GHSA-jphm-g89m-v42p"],"status":"published","title":"Path traversal in Grafana Cortex","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.)","severity":{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","level":"medium","assessor":"primary","from":"nvd"},"epss":{"day":"2026-11-11","score":0.01392,"percentile":0.72717,"model":"v2026.06.15"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":false},"cwes":["CWE-22"],"published":"2021-08-03T14:03:49Z","modified":"2026-10-20T10:55:20Z","affected":[{"source":"ghsa","ecosystem":"Go","package":"github.com/cortexproject/cortex","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"last_affected":"1.9.0"}]}]},{"source":"osv","ecosystem":"Go","package":"github.com/cortexproject/cortex","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"last_affected":"1.9.0"}]}]}],"products":[{"vendor":"linuxfoundation","product":"cortex"}],"references":[{"url":"https://grafana.com/docs/grafana/latest/release-notes/","tags":["x_refsource_MISC","x_transferred","Release Notes","Vendor Advisory","advisory"]},{"url":"https://github.com/cortexproject/cortex/pull/4375","tags":["x_refsource_MISC","x_transferred","Patch","Third Party Advisory","fix","web"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-36157","tags":["advisory"]},{"url":"https://github.com/cortexproject/cortex/commit/d9e1f81f40c607b9e97c2fc6db70ae54679917c4","tags":["web"]},{"url":"https://github.com/advisories/GHSA-jphm-g89m-v42p"},{"url":"https://github.com/cortexproject/cortex","tags":["package"]},{"url":"https://grafana.com/docs/grafana/latest/release-notes","tags":["web"]}],"sources":{"cve":[{"id":"CVE-2021-36157","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.)","status":"published","published":"2021-08-03T14:03:49Z","modified":"2024-08-04T00:47:43.99Z","updated_at":"2026-11-02T14:33:05.989686Z"}],"euvd":[{"id":"EUVD-2021-2088","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.)","status":"published","published":"2021-08-03T14:03:49Z","modified":"2024-08-04T00:47:43Z","updated_at":"2026-11-03T03:24:29.877227Z"}],"ghsa":[{"id":"GHSA-jphm-g89m-v42p","title":"Path traversal in Grafana Cortex","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.)","status":"published","published":"2021-09-02T21:59:50Z","modified":"2023-02-01T05:05:51Z","cwes":["CWE-22"],"updated_at":"2026-11-02T14:36:35.781528Z"}],"nvd":[{"id":"CVE-2021-36157","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.)","status":"published","published":"2021-08-03T15:15:08.667Z","modified":"2026-06-17T03:58:25.85Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","level":"medium","assessor":"primary"},{"version":"2.0","score":5,"vector":"AV:N/AC:L/Au:N/C:P/I:N/A:N","level":"medium","assessor":"primary"}],"cwes":["CWE-22"],"updated_at":"2026-11-02T14:06:56.562207Z"}],"osv":[{"id":"CVE-2021-36157","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.)","status":"published","published":"2021-08-03T15:15:08.667Z","modified":"2026-10-20T10:55:20.108913455Z","cvss":[{"version":"3.1","score":5.3,"vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","level":"medium"}],"updated_at":"2026-11-02T15:44:20.434873Z"},{"id":"GHSA-jphm-g89m-v42p","title":"Path traversal in Grafana Cortex","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.)","status":"published","published":"2021-09-02T21:59:50Z","modified":"2023-11-08T04:06:12.475955Z","cwes":["CWE-22"],"updated_at":"2026-11-02T15:46:50.687609Z"}]}}
