Grafana Dashboard Permissions Broken Access Control — Editor-to-Admin Privilege Escalation (CVE-2026-21721)
by Unattributed handle (repo: Leonideath) · 2026-07-05
- Severity
- High
- CVE
- CVE-2026-21721
- Category
- web
- Affected product
- Grafana (self-hosted, dashboard permissions API)
- Affected versions
- Confirmed against Grafana 12.1.1 in the author's lab
- Disclosed
- 2026-07-05
- Patch status
- unpatched
Tags
Archive entry
intelseclab/poc-archiveMetadata
| Field | Value |
|---|---|
| Date Added | 2026-07-05 |
| Last Updated | 2026-02 |
| Author / Researcher | Unattributed handle (repo: Leonideath) |
| CVE / Advisory | CVE-2026-21721 |
| Category | web |
| Severity | High |
| CVSS Score | Not specified in source |
| Status | PoC |
| Tags | grafana, privilege-escalation, broken-access-control, dashboard-permissions, editor-to-admin, api |
| Related | N/A |
Affected Target
| Field | Value |
|---|---|
| Software / System | Grafana (self-hosted, dashboard permissions API) |
| Versions Affected | Confirmed against Grafana 12.1.1 in the author’s lab |
| Language / Platform | Python 3 (uses requests) against Grafana’s HTTP API |
| Authentication Required | Yes (valid low-privileged Editor account) |
| Network Access Required | Yes |
Summary
This PoC demonstrates a broken-access-control flaw in Grafana’s per-dashboard permissions API: an authenticated user holding only the Editor role can read and rewrite the ACL (/api/dashboards/uid/{uid}/permissions) for dashboards they do not own, and use it to grant themselves Admin-level (permission level 4) access on every dashboard in the instance. The script logs in as the Editor account, enumerates every dashboard via /api/search, reads the current permission list for each dashboard, inserts or upgrades an entry for the authenticated user’s ID to permission: 4 (Admin), and POSTs it back. It then dumps datasources and admin settings to confirm the elevated access actually took effect.
Vulnerability Details
Root Cause
The dashboard permissions write endpoint (POST /api/dashboards/uid/{uid}/permissions) does not sufficiently verify that the requesting user is authorized to modify the ACL for dashboards outside their own ownership/team scope, allowing a low-privileged Editor session to add or elevate its own permission entry to Admin (level 4) on arbitrary dashboards.
Attack Vector
- Attacker authenticates to Grafana with a valid but low-privileged Editor account.
- Attacker retrieves their own
userIdvia/api/user. - Attacker enumerates all dashboards via
/api/search?type=dash-db. - For each dashboard, attacker reads existing permissions (
GET .../permissions), appends or upgrades their ownuserIdentry topermission: 4, and POSTs the modified list back. - Attacker now holds Admin-level access on every dashboard, then optionally reads datasources and admin settings to confirm privilege escalation.
Impact
An Editor-level authenticated user can escalate to Admin permissions across all dashboards in the Grafana instance, exposing connected datasource credentials/URLs and admin-only settings, and enabling further tampering with dashboards and alerting configuration instance-wide.
Environment / Lab Setup
Target: Grafana 12.1.1 (self-hosted), behind path /grafana in the author's lab
Attacker: Python 3, pip install requests urllib3
Proof of Concept
PoC Script
See
exploit_CVE-2026-21721.pyin this folder.
| |
The script logs in with the supplied Editor credentials, resolves the caller’s user ID, enumerates all dashboards, and attempts to rewrite each dashboard’s permission ACL to grant the caller Admin (level 4) rights, printing per-dashboard success/failure and a post-escalation dump of datasources and admin settings.
Detection & Indicators of Compromise
Signs of compromise:
- A non-Admin user’s account appearing with
permission: 4(Admin) on dashboards they do not own - Bursts of
/api/dashboards/uid/{uid}/permissionsPOST requests from one session touching many distinct dashboard UIDs - Unexpected reads of
/api/datasourcesor/api/admin/settingsfrom an Editor-tier account immediately after permission changes
Remediation
| Action | Detail |
|---|---|
| Primary fix | No vendor patch confirmed as of 2026-07-05 — monitor for a Grafana security advisory for CVE-2026-21721 |
| Interim mitigation | Restrict who can call the dashboard permissions API via reverse-proxy/RBAC rules, audit and alert on permission-list changes that add Admin entries, review existing dashboard ACLs for unauthorized Admin grants |
References
Notes
Mirrored from https://github.com/Leonideath/Exploit-LPE-CVE-2026-21721 on 2026-07-05.
| |