Summary
A missing privilege-level check in the Grav Login plugin lets users with api.users.write permission clear login lockout counters for admin.super accounts. This can remove brute-force protections from the highest-privilege accounts without granting the attacker equivalent administrative permissions.
Affected context
The issue occurs in Grav Login plugin versions before 1.0.16 when the onApiUserListRowAction unlock handler processes requests for locked accounts. Deployments are exposed when a user has api.users.write permission and the handler does not verify that the target account's privilege level is within the requester's authorized scope.
Exploit preconditions
- Attack surface: The Grav user-management API and its account-unlock action - Required access: An authenticated account with api.users.write permission - Trigger point: Processing an unlock request for an admin.super account - Why exploitation is possible: The handler authorizes the action without
validating whether the requester may manage the target account's privilege
level
Why this happens
The underlying bug is an object-level authorization failure. The unlock handler checks whether the caller can perform a general user-management operation but does not enforce an additional authorization boundary based on the target account's privilege level. This maps to CWE-863, which covers incorrect authorization decisions that allow an actor to perform an action outside the intended security policy.
Potential impact
- An attacker may clear lockout counters protecting privileged accounts.
- Brute-force attempts against admin.super accounts could become more feasible.
- The likelihood of administrative-account compromise could increase.
- Compromised privileged accounts could lead to broader site or data impact.
General mitigation guidance
Mitigation generally focuses on enforcing authorization at the target-object and privilege-boundary levels. Secure-by-default designs should require explicit permission to manage accounts of equal or greater privilege, deny ambiguous or unsupported target relationships, and apply the same checks in every API and user-interface path. Reducing trust in client-supplied account identifiers, centralizing authorization policy, preserving lockout protections for privileged accounts, and limiting account-management permissions according to least privilege can reduce exposure.
How teams detect issues like this
Detection approaches include static analysis and code review for handlers that authorize an operation without comparing caller and target privilege levels, especially where user identifiers or role data are supplied by the request. Monitor audit logs for unlock actions involving privileged accounts, unusual lockout-counter resets, and activity by lower-privileged API identities. Policy enforcement can require centralized object-level authorization checks and security tests covering cross-privilege account-management requests.

