CVE-2026-21726 Loki Path Traversal - CVE-2021-36156 Bypass
Attackers can bypass path traversal protections in Grafana Loki to read arbitrary files via the Ruler API endpoint.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2026-21726?
CVE-2026-21726 is a medium-severity path traversal vulnerability in Grafana Loki, published on 15 Apr 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
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.
Weakness: CWE-22
Which versions are affected by CVE-2026-21726?
4 open source packages ship an affected version, including github.com/grafana/loki/v3 and github.com/grafana/loki. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
github.com/grafana/loki/v3 Go | All versions | 3.6.4 |
github.com/grafana/loki/v3 Go | All versions | 3.6.4 |
github.com/grafana/loki/v3 Go | All versions | 3.6.4 |
github.com/grafana/loki Go | All versions | None |
Products include Grafana Loki.
How do I fix CVE-2026-21726?
Upgrade github.com/grafana/loki/v3 to 3.6.4 or later.
Upgrade, and resolve every user-supplied path against an allowed base folder before opening it. More about Path traversal.
Is CVE-2026-21726 being exploited?
There is no known exploitation of CVE-2026-21726 in the wild and no public exploit code.
Other vulnerabilities in Grafana Loki
Sources
Also known as CLEANSTART-2026-JO14647, CLEANSTART-2026-WN62977, CLEANSTART-2026-YM30518, CLEANSTART-2026-ZS27491, ECHO-d86c-cc77-aee6, GHSA-497x-rrr9-68jp and 28 more.