CVE-2022-24812

8.0 HIGH

📋 TL;DR

This vulnerability in Grafana Enterprise allows privilege escalation when fine-grained access control is enabled. An attacker can use a lower-privilege API key to inherit cached permissions from a previously used higher-privilege API key, gaining unauthorized access. Only Grafana Enterprise installations with fine-grained access control enabled and multiple API keys with different roles are affected.

💻 Affected Systems

Products:
  • Grafana Enterprise
Versions: 8.1.0-beta1 through 8.4.5
Operating Systems: All
Default Config Vulnerable: ✅ No
Notes: Only vulnerable when fine-grained access control beta feature is enabled AND there are multiple API keys with different roles in the same organization.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

An attacker with a Viewer API key could gain Admin privileges, allowing full control over the Grafana instance including data manipulation, user management, and system configuration changes.

🟠

Likely Case

Unauthorized access to dashboards, data sources, or administrative functions beyond the assigned permission level, potentially leading to data exposure or manipulation.

🟢

If Mitigated

With fine-grained access control disabled or proper patching, the vulnerability is eliminated and API keys function with correct permission boundaries.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploitation requires valid API keys and specific configuration conditions. The advisory provides technical details but no public exploit code.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Grafana Enterprise 8.4.6 and later

Vendor Advisory: https://github.com/grafana/grafana/security/advisories/GHSA-82gq-xfg3-5j7v

Restart Required: Yes

Instructions:

1. Backup your Grafana configuration and data. 2. Download Grafana Enterprise 8.4.6 or later from official sources. 3. Stop the Grafana service. 4. Install the updated version following your platform's installation procedures. 5. Restart the Grafana service. 6. Verify the upgrade was successful.

🔧 Temporary Workarounds

Disable Fine-Grained Access Control

all

Temporarily disable the vulnerable feature until patching can be completed.

Edit grafana.ini configuration file and set: [auth.basic] enabled = false
Or use Grafana admin interface to disable fine-grained access control

🧯 If You Can't Patch

  • Disable fine-grained access control immediately
  • Rotate all API keys and implement strict API key usage monitoring

🔍 How to Verify

Check if Vulnerable:

Check if running Grafana Enterprise version between 8.1.0-beta1 and 8.4.5 AND fine-grained access control is enabled AND multiple API keys with different roles exist in any organization.

Check Version:

grafana-server -v

Verify Fix Applied:

Verify Grafana Enterprise version is 8.4.6 or higher using the version check command and confirm fine-grained access control functions correctly with API key testing.

📡 Detection & Monitoring

Log Indicators:

  • Unusual API key usage patterns
  • API requests from same source with different privilege levels in quick succession
  • Permission denied errors followed by successful access

Network Indicators:

  • Rapid API key switching in API requests
  • Unexpected privilege escalation in API call sequences

SIEM Query:

source="grafana" AND ("API Key" OR "authentication") AND ("permission" OR "access") AND ("escalation" OR "unauthorized")

🔗 References

📤 Share & Export