CVE-2021-41244

9.1 CRITICAL

📋 TL;DR

This vulnerability in Grafana allows organization administrators to access and modify users in other organizations when fine-grained access control is enabled. It affects Grafana instances with multiple organizations running versions 8.0 through 8.2.3 with the beta feature enabled.

💻 Affected Systems

Products:
  • Grafana
Versions: 8.0 through 8.2.3
Operating Systems: All
Default Config Vulnerable: ✅ No
Notes: Only vulnerable when fine-grained access control beta feature is enabled AND there is more than one organization in the instance.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Organization admins could gain unauthorized access to all organizations, modify user roles, escalate privileges, and potentially compromise the entire monitoring infrastructure.

🟠

Likely Case

Organization admins accidentally or intentionally accessing users in other organizations they shouldn't have access to, leading to privilege escalation and data exposure.

🟢

If Mitigated

Limited to authorized organization admins only accessing their own organization's users as intended.

🌐 Internet-Facing: HIGH - Grafana instances exposed to the internet with multiple organizations are at significant risk of unauthorized access.
🏢 Internal Only: MEDIUM - Internal instances still face risk from insider threats or compromised accounts.

🎯 Exploit Status

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

Requires authenticated organization admin access. The vulnerability is straightforward to exploit once conditions are met.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 8.2.4 and later

Vendor Advisory: https://github.com/grafana/grafana/security/advisories/GHSA-mpwp-42x6-4wmx

Restart Required: Yes

Instructions:

1. Backup your Grafana configuration and data. 2. Download Grafana 8.2.4 or later from official sources. 3. Stop Grafana service. 4. Install the new version. 5. Start Grafana service. 6. Verify functionality.

🔧 Temporary Workarounds

Disable fine-grained access control

all

Turn off the beta feature flag for fine-grained access control

Edit grafana.ini and set: [feature_toggles] enable = fineGrainedAccessControl false
Or set environment variable: GF_FEATURE_TOGGLES_ENABLE=grafana-access-control-token

🧯 If You Can't Patch

  • Disable fine-grained access control beta feature immediately
  • Restrict organization admin roles to trusted users only and monitor their activities

🔍 How to Verify

Check if Vulnerable:

Check Grafana version and feature flags: 1. Navigate to Administration → About in Grafana UI. 2. Check if version is between 8.0 and 8.2.3. 3. Check if fine-grained access control is enabled in feature flags.

Check Version:

grafana-cli --version or check /api/health endpoint

Verify Fix Applied:

1. Confirm Grafana version is 8.2.4 or higher. 2. Verify organization admins can only access users in their own organization. 3. Test cross-organization user access attempts fail.

📡 Detection & Monitoring

Log Indicators:

  • Organization admin accessing users from other organizations
  • Unauthorized user role modifications across organizations
  • Failed access attempts to other organizations' users

Network Indicators:

  • API calls to /api/orgs/[other_org_id]/users endpoints from unauthorized sources

SIEM Query:

source="grafana" AND ("org_users" OR "update_role") AND org_id!="current_org"

🔗 References

📤 Share & Export