CVE-2026-130742: Grav 2.0.0 before 2.2.18 Object Deletion via Flex Sort Field
Grav 2.0.0 before 2.2.18 resolves Flex sort and filter field names by first calling them as public methods, so a field named delete invokes FlexObject::delete() without any permission check. Authenticated users with only list access can send GET /api/v1/flex-objects/user-accounts?sort=delete requests to delete every account, then use the reopened API first-run setup to create a super admin.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 2.2.18
Event History
Frequently Asked Questions
Who can exploit this issue?
Any authenticated user with list access to the affected Flex user-accounts API can exploit it. Administrative permissions are not required for the deletion action.
What request triggers the destructive behavior?
A GET request to /api/v1/flex-objects/user-accounts with the sort parameter set to delete triggers resolution of delete as a public method. The described request is GET /api/v1/flex-objects/user-accounts?sort=delete.
What is the practical impact after account deletion?
The request can delete every account. An attacker can then use the reopened API first-run setup to create a super admin.
Are default installations affected?
The provided information identifies affected Grav versions as 2.0.0 before 2.2.18, but does not state whether list access to the user-accounts API is enabled by default.