Summary
Grav has a privilege-escalation vulnerability in its user and group management workflows. An authenticated user manager with admin.users.update may be able to disable the group that grants super admin privileges and then reset a super admin's password, potentially taking over that account.
Affected context
The issue affects Grav versions from 2.0.0 before 2.2.18 when the Flex user-groups and user-accounts forms are available to a user manager with the admin.users.update permission. Risk arises when that user can disable the super-granting group and use the account-management workflow to reset a super admin's password.
Exploit preconditions
- Attack surface: Grav's administrative user-group and user-account forms
- Required access: An authenticated user manager with
admin.users.update - Trigger point: Disabling the super-granting group through the Flex user-groups form, followed by a password reset through the user-accounts form
- Why exploitation is possible: The group and account-management workflows allow a permitted user manager to affect super admin access in a way that can result in account takeover
Why this happens
This is an improper privilege management issue mapped to CWE-269. The user-management workflows do not sufficiently protect the relationship between group state, super admin privileges, and password-reset authority. As a result, a user with a narrower administrative permission may be able to alter access controls and take over a more privileged account.
Potential impact
- A user manager could gain super admin access
- An affected super admin account could be taken over
- An attacker could make privileged configuration or content changes
- Administrative access could be abused to affect other users or site operations
General mitigation guidance
Mitigation generally focuses on enforcing clear privilege boundaries across group and account-management workflows.
- Protect super-granting groups from changes by users who are not authorized to manage super admin access
- Require explicit, separately scoped authorization for password resets involving privileged accounts
- Validate authorization against effective privileges and account state at the point of each sensitive operation
- Apply least privilege to administrative roles and reduce the number of accounts with user-management permissions
- Audit and alert on changes to privileged groups and password resets for privileged accounts
How teams detect issues like this
Review authorization checks for group edits and password resets, especially where the target is a privileged group or account. Static analysis and code review can look for sensitive operations that rely on broad user-management permissions without checking the target's privilege level. Policy enforcement and audit monitoring can flag disabling privileged groups and password resets affecting super admin accounts.

