Executive brief
The Grav API Plugin is a headless content access layer for Grav CMS sites. A basic panel user can exploit improper authorization in the API key generation and revocation functions to create persistent credentials bound to another user's account, inheriting that user's API permissions including administrative write access. This allows a low-privilege attacker to escalate to full administrative control over the site's content and API.
Technical details
The vulnerability is a privilege escalation (or authorization bypass) in user/plugins/api/api.php. The apiKeyGenerate and apiKeyRevoke admin tasks check only for admin.login permission rather than enforcing proper account ownership or account-management restrictions. An authenticated user with basic panel access can specify an arbitrary target account in the request, create an API key bound to that account, and inherit the target's permissions—including api.super or admin write access if the target is a super admin. The attack requires authentication and network access to the admin panel. The vulnerability is fixed in version 1.0.8, which restricts API key generation/revocation to account-management permission holders and prevents super admins from having keys generated by non-super admins.
Affected products
- Grav API Plugin prior to 1.0.8
Timeline
- 2026-08-19: disclosed
- 2026-07-04: patched: Version 1.0.8 released with security fix