/

CVE-2026-130739

Severity:

HIGH RISK

(8.8)

Privilege Escalation (CWE-639) in Grav Account Storage

CVE-2026-130739

Deferred

Vulnerability type

Category:

Authorization Bypass and Privilege Escalation

CWE:

CWE-639

Impact:

Account privilege escalation, account modification, and account deletion

Severity:

HIGH RISK

(8.8)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

Grav contains an authorization flaw that can let user managers and Flex editors manipulate accounts through client-controlled storage keys. Depending on the form and storage operation involved, an attacker with those privileges may create or elevate an account to super-admin, overwrite account data, or delete account files.

Affected context

The issue affects Grav versions from 2.0.0 up to, but not including, 2.2.18, where account-management or Flex editing workflows accept client-controlled storage keys. Risk depends on whether a user manager or Flex editor can reach the relevant forms and submit values that influence account storage operations.

Exploit preconditions

  • Attack surface: Grav account-management and Flex editing forms that interact with account storage
  • Required access: An authenticated user with user-manager or Flex-editor capabilities
  • Trigger point: Form submissions involving a create-form username, cross-type form flash replay, or a __META storage-key rename
  • Why exploitation is possible: Client-controlled storage keys can influence which account records are created, overwritten, or deleted without adequate authorization checks for the resulting operation

Why this happens

The underlying issue is an authorization weakness involving user-controlled identifiers. When a client-supplied storage key determines which account data is modified, access checks may not sufficiently bind the requested operation to the actor's permitted scope. This maps to CWE-639: Authorization Bypass Through User-Controlled Key, where changing a key can expose or alter resources that the user should not control.

Potential impact

  • An attacker may create or elevate an account to super-admin.
  • Account data could be overwritten or manipulated.
  • Account files could be deleted, potentially disrupting access or administration.
  • Compromised administrative accounts could enable further changes within the Grav site.

General mitigation guidance

Defensive patterns focus on authorizing the target resource and operation on the server side rather than trusting identifiers supplied by the client.

  • Bind storage keys to the authenticated user's permitted scope and verify authorization for every create, update, rename, and delete operation.
  • Prefer server-generated identifiers and allowlisted operations over client-selected storage keys.
  • Validate form type and workflow state to prevent cross-type replay or unintended reuse of submitted data.
  • Apply least privilege to user-manager and Flex-editor roles, limiting account-management capabilities to the minimum necessary.
  • Audit sensitive account changes and protect account storage from unauthorized modification.

How teams detect issues like this

  • Review account and Flex form handlers for storage operations that use client-supplied usernames, keys, or metadata.
  • Use static analysis or code review checks to trace request values into account creation, update, rename, and deletion functions.
  • Test authorization boundaries across roles, form types, and workflow states, including replayed or mismatched submissions.
  • Enforce policies requiring server-side authorization checks on every resource identified by a user-controlled key.

Sources

SourceLink
github.comgithub.com/getgrav/grav/security/advisories/GHSA-6c4v-4wrv-3559

Frequently asked

questions

The described attack paths require an authenticated user with user-manager or Flex-editor capabilities and access to the relevant forms.

It can be triggered through Grav's form workflows, so an attacker generally needs access to the application and sufficient privileges to submit the relevant requests. The description does not establish unauthenticated access.

Perform server-side authorization for the specific account and operation, and avoid allowing client-supplied storage keys to select or redirect sensitive account changes.

Use server-controlled identifiers where practical, validate workflow and form context, test access boundaries across roles, and apply least privilege to account-management functions.

Find out what's already
exploitable in your codebase.