Research

Two Grav bugs hiding behind working permission checks

Direct user-management and deletion requests returned 403. The same actions succeeded when a page carried the instructions through Login and Flex Objects.

There were two HTTP 403 responses, exactly where we expected them.

A publisher who could create pages but could not manage users called Grav’s protected invitation API. Grav refused the request. In a separate test, the publisher and a signed-in editor each tried to delete a protected Page object. Grav refused those requests too.

Then we moved the instructions into page content.

The publisher used a Login form to describe an invitation that granted super-user permissions. A signed-out visitor submitted the form, received the token by email, and registered a new super user. On another page, the publisher stored two Flex method calls. An editor opened the page and the protected Page disappeared.

The direct permission checks were working. The page-backed paths went around them.

Grav published the issues on 7 October 2026 as CVE-2026-114658 and CVE-2026-114660, with credit to Omoikane Labs. They are separate vulnerabilities, but both leave the same question: what happens when a limited author can store instructions that execute somewhere more privileged?

The Login invitation and Flex method-call paths reproduced in Grav.

The direct requests returned 403. Moving the same intent into page content reached a different path.

The invitation form that chose its own privileges

The Login plugin supports invitation-based registration. An account manager chooses an email address and the permissions the new account should receive; the plugin emails a token; the recipient follows it and finishes registration.

Grav pages can define forms, including metadata consumed by plugins. In Login 3.9.12, taskInvite() took the account configuration straight from the active form’s blueprint:

$invite = (array)($form->getBlueprint()->get('form/meta/invite')) + $defaults;
'account' => $invite['account']

Those two lines connect page-authored data to the stored invitation. What is missing between them is the decision about who is allowed to issue the invitation and how much authority that person may grant.

We tested with a publisher account that could create a page but was not a super user. Calling the invitation API as that account returned 403. We then created a page-backed invitation form whose metadata requested super_admin and api.users.write.

The rest of the flow did not require the publisher’s session. We signed out, submitted the form with an email address we controlled, received a valid invitation token, and completed registration. The resulting account was a new super user with user-management access.

Turning off public registration did not stop this path. Registration through a valid invitation token is separate, and the token preserved the account configuration copied from the page. By the time the recipient used it, the dangerous choice had already been stored.

Login 3.9.13 fixes both halves of the problem. The invitation task now requires a super user or account manager:

if (!$this->login->isAuthenticated([
'admin.super', 'api.super', 'admin.users', 'api.users.write'
])) {
return false;
}

It also removes super-user and group grants when the issuer is not already a super user. Checking only the first condition would still let an ordinary account manager create an account stronger than their own.

The page that deleted another page

The second issue lived in Grav’s Flex Objects framework. Flex fields can derive values by calling methods on an object. That is reasonable for trusted blueprint files. It becomes a different feature when a page author can choose the method and its arguments.

In Grav 2.2.4, dynamicFlexField() checked whether the method existed and then called it:

if ($object && method_exists($object, $method)) {
$value = $object->{$method}(...$params);
}

method_exists() tells Grav that PHP can make the call. It says nothing about whether page content should be allowed to choose it.

Our publisher could not delete the protected target. The editor who later viewed the publisher’s page could not delete it directly either; that request also returned 403. The editor was, however, allowed to load the object used by the page.

The page contained one directive that called setStorageKey() and pointed that loaded object at the protected target. A second directive called delete(). When the editor opened the page, Grav evaluated both calls in the editor’s session. The protected Page was deleted. A harmless comparison object remained, which ruled out a broad cleanup or unrelated delete permission.

That is the impact we demonstrated: stored page content could make another signed-in user delete a Page that neither account could delete directly. We did not demonstrate code execution or arbitrary file access.

Grav 2.2.5 replaces the open-ended call with a very small allowlist. Untrusted page frontmatter may ask whether an object exists, but it may not pass arguments or select another method:

if (!($call['trusted'] ?? false) && (strtolower($method) !== 'exists' || $params)) {
return;
}

Trusted blueprint files keep the broader behavior. Page content does not.

The permission check was on the wrong action

In the first bug, Grav protected the invitation API but trusted the permissions stored in a page-backed form. In the second, it protected direct deletion but trusted method calls stored in page frontmatter.

The server knew who submitted the form and who opened the page. What it had lost was who chose the privileged instruction.

An invitation token proves that an invitation is valid; it does not prove that the page author was allowed to choose its grants. An editor’s session proves that the editor may load an object; it does not mean the editor chose every method embedded in the page they are viewing.

That distinction is the common root of the two issues. The fixes address it at the point where the instruction crosses the boundary: Login re-authorizes invitation creation and caps delegated grants; Flex stops treating page-authored method names as a general dispatch mechanism.

Exposure and response

CVE-2026-114658 affects Login plugin versions 3.6.0 through 3.9.12 and is fixed in 3.9.13. It starts with page-authoring access and a mailbox controlled by the attacker. After the page exists, form submission can be anonymous and no administrator needs to open it. The CVE record scores it 8.7 High under CVSS 4.0 and 8.8 High under CVSS 3.1.

CVE-2026-114660 affects Grav 2.0.0 through 2.2.4 and is fixed in 2.2.5. It needs a page author and a signed-in user who later opens the page. The CVE record scores it 7.0 High under CVSS 4.0 and 6.3 Medium under CVSS 3.1. Grav’s advisory says the same code exists in Grav 1.7, but no backport is planned.

The CISA ADP entries in the public CVE records marked exploitation as none for both issues as of 28 October and 5 November 2026 respectively. That is a dated “not known” assessment, not evidence that exploitation never happened.

Sites that ran the affected versions should review:

  • invitations and new accounts created during the exposure window, especially unexpected super-user or group grants;

  • page revisions that added invitation account metadata or dynamic Flex method directives; and

  • unexplained Page deletions shortly after an editor viewed recently changed content.

Upgrade the Login plugin to 3.9.13 or later and Grav 2.x to 2.2.5 or later. Grav 1.7 operators need to migrate or prevent untrusted authors from reaching the affected Flex path. Disabling public registration does not close the invitation path, and backups only help recover a deleted page after the fact.

Timeline

  • 2 October 2026 — We reproduced both issues against the current release and development branches.

  • 6 October 2026 — Grav released Login 3.9.13 and Grav 2.2.5.

  • 7 October 2026 — Grav published both GitHub Security Advisories.

  • 22 October 2026 — CVE-2026-114658 and CVE-2026-114660 were published in the CVE List.

References