Medium
Security advisory
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.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2021-36156
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 31 Oct 2026, 11:59 UTC · Revision 1
Source evidence
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.
osv:CVE-2021-36156
Complete source record
{
"id": "bf330b2e9133cd71e5f52796a2217e95c514d7c1a50c57d52e5b56dad3467470",
"url": "https://osv.dev/vulnerability/CVE-2021-36156",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "CVE-2021-36156",
"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.",
"evidence": "osv:CVE-2021-36156",
"products": [],
"severity": "medium",
"structured": {
"id": "CVE-2021-36156",
"aliases": [
"CVE-2021-36156",
"GHSA-grj5-8x6q-hc9q"
],
"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/grafana/loki",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"last_affected": "babea82ef558c4b4dc685fd4ca677de1f0a7ee8f"
},
{
"fixed": "f5fd029660034d31833ff1d2620bb82d1c1618af"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:grafana:loki:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "0"
},
{
"last_affected": "2.2.1"
}
],
"source": "CPE_RANGE"
},
{
"range": [
{
"fixed": "f5fd029660034d31833ff1d2620bb82d1c1618af"
}
],
"source": "REFERENCES_TAG",
"original_tag": "v2.3.0"
}
]
}
}
],
"versions": [
"v2.2.0",
"v2.2.1",
"v2.0.0",
"v1.6.0",
"v1.5.0",
"v1.3.0",
"v1.2.0",
"v1.1.0",
"v1.0.0",
"v0.4.0",
"v0.3.0",
"v0.2.0",
"v1.0.1",
"v0.1.0"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-36156.json"
}
}
],
"modified": "2026-10-20T10:55:02.616212417Z",
"provider": "osv",
"references": [
"https://github.com/grafana/loki/pull/4020#issue-694377133",
"https://github.com/grafana/loki/releases/tag/v2.3.0"
],
"provider_metadata": {}
},
"related_cves": [
{
"value": "CVE-2021-36156",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 386765,
"published_at": "2021-08-03T15:15:08.623+00:00"
}