High, CVSS 8.8PackagistPublished
Grav API Privilege Escalation to Super Admin
CVE-2026-42843 · GHSA-r945-h4vm-h736
- Affected
- Packagist getgrav/grav-plugin-api < 1.0.0-beta.15
- Fixed in
- 1.0.0-beta.15· Vendor fix available
- Issue
- An insecure direct object reference and logic flaw in the Grav API plugin (UsersController::update) allows any authenticated user with basic API access (api.access) to modify their own permission configuration. An attacker can exploit this to escalate their privileges to Super Administrator (admin.super and api.super), leading to full system compromise and potential RCE. Details The vulnerability is located in user/plugins/api/classes/Api/Controllers/UsersController.php within the update method. The API allows users to update their own profiles if they possess the basic api.access permission: However, when filtering the fields that are allowed to be updated via a PATCH request, the access field (which defines the user's role and permissions) is indiscriminately included in the $allowedFields whitelist for all users: Because there is no secondary check to verify if the user attempting to modify the access field is already an administrator, any low-privileged user can overwrite…
Recommended action: Upgrade to 1.0.0-beta.15 (pre-release) or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.