The CVE-2021-36156 fix validates the namespace parameter for path traversal sequences after a single URL decode, by double encoding, an attacker can read files at the Ruler API endpoint /loki/api/v1/rules/{namespace}
Thanks to Prasanth Sundararajan for reporting this vulnerability.
Security readout for executives and security teams
Plain-English summary
Grafana Loki 2.3.0 can expose files through its rules API when a specially encoded namespace bypasses earlier path-traversal validation. Successful exploitation affects confidentiality only; the supplied CVSS score is 5.3. Risk is greatest where the Ruler API is reachable from untrusted networks.
Executive priority
Treat as a prompt remediation item, especially for internet-facing or broadly accessible Loki 2.3.0 deployments. It is not supported as an emergency-level threat because impact is limited to file disclosure and active exploitation is unconfirmed.
Technical view
This CWE-22 flaw bypasses the CVE-2021-36156 fix. That fix checks the namespace after one URL-decoding pass, but double encoding can evade validation at /loki/api/v1/rules/{namespace}. The supplied vector indicates network access, low complexity, no privileges, no user interaction, and limited confidentiality impact.
Likely exposure
The supplied affected-version data specifically identifies Grafana Loki 2.3.0. Prioritize instances where the Ruler API endpoint is enabled and network-reachable. The bundle does not establish exposure for other versions, configurations, or products.
Exploitation context
The supplied record is not in CISA KEV, and no cited source reports active exploitation. Exploitation is nevertheless described as remotely reachable, low complexity, and unauthenticated by the CVSS vector. No exploit code or observed campaign evidence is provided.
Researcher notes
The key weakness is inconsistent canonicalization: validation occurs after only one decode, allowing a second encoded layer to reintroduce traversal semantics. The source bundle does not name exposed file scope, fixed releases, prerequisites beyond the endpoint, or confirmed exploitation; those details require current vendor guidance.
Mitigation direction
Inventory Loki deployments and identify any running version 2.3.0.
Restrict Ruler API access to trusted networks and authorized users where operationally feasible.
Check Grafana's advisory for supported fixed versions or vendor-approved remediation.
Monitor the rules endpoint for abnormal encoded namespace requests and unexpected file-access behavior.
Validation and detection
Confirm deployed Loki versions using trusted asset and package inventories.
Determine whether the Ruler API is enabled and reachable from untrusted networks.
Review proxy and Loki logs for repeated or unusually encoded rules namespace requests.
Verify remediation against Grafana's advisory without performing destructive file-access testing.
Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.
Potential ATT&CK relevance
Conservative CVE-to-ATT&CK context
These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.
ATT&CK lookup starting points
Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.
cwe · medium confidence lookup
CWE-22: File access and web shell behavior lookup
File traversal and upload weaknesses can lead teams to review file, web shell, execution, and collection telemetry. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.
The CVE wording references file access or upload behavior, so file telemetry and web shell review may help. This is a Glexia inferred lookup path, not an official MITRE, ATT&CK, or CVE Program mapping.
These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.
We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.
CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.
CWE-22 · source CWE mapping
Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.