{"id":"CVE-2021-36156","aliases":["CVE-2021-36156","GHSA-grj5-8x6q-hc9q"],"related":[],"kind":"vulnerability","state":"published","title":"Path traversal in Grafana Loki","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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"es","text":"Se ha detectado un problema en Grafana Loki versiones hasta 2.2.1. El valor del encabezado X-Scope-OrgID es usado para diseñar las rutas de los archivos de reglas, y si se diseña para realizar un salto de directorio como ae ../../sensitive/path/in/deployment pathname, Loki intentará entonces analizar un archivo de reglas en esa ubicación e incluirá parte del contenido en el mensaje de error","source":"nvd"}],"published":"2021-08-03T14:12:11.000Z","modified":"2026-08-07T08:12:26.278Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","score":5.3,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","score":5.3,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N","score":5.3,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:2.0","vector":"AV:N/AC:L/Au:N/C:P/I:N/A:N","score":5,"rating":"MEDIUM"}],"cwes":["CWE-22"],"affected":[{"ranges":[{"version":"n/a","status":"affected"}],"source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"2.3.0"}],"ecosystem":"Go","package":"github.com/grafana/loki","purl":"pkg:golang/github.com/grafana/loki","source":"ghsa"},{"ranges":[{"status":"affected","lastAffected":"2.2.1"}],"vendor":"grafana","product":"loki","cpe":"cpe:2.3:a:grafana:loki:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/grafana/loki/pull/4020#issue-694377133","tags":["issue-tracking","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/grafana/loki/releases/tag/v2.3.0","tags":["patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2021-36156","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/grafana/loki/pull/4020","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/grafana/loki","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"mitre","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2021-36156","url":"https://www.cve.org/CVERecord?id=CVE-2021-36156","licence":"CVE Terms of Use","modified":"2024-08-04T00:47:43.938Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-grj5-8x6q-hc9q","url":"https://github.com/advisories/GHSA-grj5-8x6q-hc9q","licence":"CC-BY-4.0","modified":"2026-08-07T08:12:26.278Z"},{"source":"nvd","name":"NVD","id":"CVE-2021-36156","url":"https://nvd.nist.gov/vuln/detail/CVE-2021-36156","licence":"Public domain","modified":"2026-06-17T03:58:25.737Z"}],"updatedAt":"2026-11-25T22:58:02.946Z","epss":{"score":0.02552,"percentile":0.85488,"date":"2026-12-01T12:00:22.000Z"}}