Summary
A missing authorization check in Grav's API plugin allows authenticated users with the baseline api.access permission to invoke menubar actions without satisfying a plugin's intended authorize requirement. The issue becomes risky when a first- or third-party plugin exposes privileged actions through the affected API endpoint.
Affected context
The vulnerability occurs in Grav deployments using the API and menubar action functionality. The listing endpoint may filter items according to each plugin's authorization policy, while the corresponding POST action endpoint can omit that policy check and rely only on the general api.access permission. The practical impact depends on whether installed plugins register actions that require additional authorization.
Exploit preconditions
- Attack surface: The authenticated POST API endpoint for menubar actions
- Required access: A valid account or session with the baseline
api.accesspermission - Trigger point: Direct invocation of a registered menubar action
- Why exploitation is possible: The action handler checks general API access but does not consistently evaluate the plugin-defined
authorizerequirement
Why this happens
The underlying flaw is an authorization enforcement gap. Authorization is applied when menubar items are listed, but the server-side action execution path does not repeat the plugin-specific authorization decision before performing the requested operation. This maps to CWE-862: Missing Authorization, where access control is absent or inconsistently enforced on a protected operation.
Potential impact
- An authenticated user could invoke actions intended for more privileged users
- Plugin-specific administrative operations could be performed without the required authorization
- Application configuration or content could be modified, depending on the exposed action
- A vulnerable or malicious third-party plugin could expand the consequences to data exposure or code execution
General mitigation guidance
Mitigation generally focuses on enforcing authorization at every action execution boundary rather than relying on UI filtering or endpoint-level permissions alone.
Common defensive patterns include:
- Evaluate each plugin-defined authorization requirement immediately before executing an action
- Apply consistent server-side checks to both listing and execution paths
- Use deny-by-default behavior when an authorization rule is missing, invalid, or cannot be evaluated
- Limit
api.accessgrants to users and service accounts that genuinely require API functionality - Review installed plugins for privileged actions and minimize their operational permissions
- Treat client-visible menus and action identifiers as untrusted input
How teams detect issues like this
Organizations can look for this class of issue through:
- Static analysis that compares authorization checks on action discovery and action execution paths
- Code review signals such as endpoint handlers dispatching plugin actions without invoking registered authorization callbacks
- Integration tests that call privileged actions directly using accounts with baseline API access only
- API gateway or application policies that restrict sensitive action routes by role or capability
- Audit logging and monitoring for unusual menubar action invocations by lower-privileged accounts
Automated security review tools may help identify inconsistent access-control enforcement, but endpoint-specific authorization tests remain important.

