CVE-2021-36156:
Path traversal in Grafana Loki
5.3
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.59605%
CWE
Published
9/2/2021
Updated
2/1/2023
KEV Status
No
Technology
Go
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
github.com/grafana/loki | go | < 2.3.0 | 2.3.0 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from using unsanitized X-Scope-OrgID values in file path construction. The ruler component's rule group synchronization logic (SyncRuleGroups
) directly used tenant IDs to build filesystem paths. Since Loki's ruler inherits from Cortex's implementation, and the fix involved updating Cortex's tenant ID validation
, the vulnerable function would be in the rule management logic that handles tenant-specific paths. The description explicitly mentions rules file path construction as the attack vector, aligning with the ruler component's responsibilities.