/

CVE-2026-72828

Severity:

HIGH RISK

(7.2)

Improper Privilege Management (CWE-269) in Grav API

CVE-2026-72828

Deferred

Vulnerability type

Category:

Improper Privilege Management

CWE:

CWE-269

Impact:

Privilege Escalation and Account Takeover

Severity:

HIGH RISK

(7.2)

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 Plugin API contains an authorization flaw in its invitation workflow that does not consistently enforce API-key scope limits. A least-privilege API key associated with a super account may create an invitation carrying super-admin privileges, which can lead to creation of a fully privileged account when the invitation is accepted.

Affected context

The issue occurs in the Grav Plugin API's InvitationsController when API-key-based access is used to create invitations. It is relevant where a scoped API key is associated with a super account and invitation privilege flags are processed without a scope-aware authorization decision. Deployments that permit invitation creation through the affected API workflow may be exposed.

Exploit preconditions

  • Attack surface: Grav Plugin API invitation-management endpoints
  • Required access: An authenticated API key with permission to create or manage users, such as a key scoped to api.users.write
  • Required account context: The key is minted on or associated with a super account
  • Trigger point: Creation and subsequent acceptance of an invitation
  • Why exploitation is possible: The controller relies on a bare super-admin check for sensitive decisions instead of evaluating the effective API-key scopes, allowing privileged invitation attributes to be preserved

Why this happens

The underlying bug is an authorization decision made against the parent account's super-admin status rather than the caller's effective permission scope. As a result, a least-privilege API key can influence security-sensitive invitation attributes that should be restricted to explicitly authorized operations. This is an instance of CWE-269: Improper Privilege Management, in which access-control decisions fail to enforce the intended privilege boundary.

Potential impact

  • A lower-privileged API key may create an invitation containing super-admin access flags
  • An accepted invitation could create a fully privileged account
  • An attacker may gain administrative control over the Grav installation
  • Site content, users, configuration, and extensions could be modified
  • The affected installation could be used to compromise connected services or data

General mitigation guidance

Mitigation generally focuses on enforcing authorization at the point where every sensitive invitation attribute is accepted or persisted.

Common defensive patterns include:

  • Evaluate effective API-key scopes for each privileged operation rather than relying only on the owning account's role
  • Apply deny-by-default rules to super-admin invitation flags
  • Revalidate invitation privileges when an invitation is accepted
  • Avoid trusting client-supplied authorization attributes
  • Separate user-management permissions from super-admin delegation permissions
  • Apply least privilege to API keys and administrative accounts
  • Record and review invitation creation, acceptance, and privilege-assignment events

How teams detect issues like this

Organizations can look for this class of issue through:

  • Static analysis and code review checks for role checks that bypass scope or capability evaluation
  • Tests that compare behavior between full-privilege accounts and narrowly scoped API keys
  • Review of invitation code paths for client-controlled privilege flags
  • Authorization policy tests covering both invitation creation and acceptance
  • Audit-log monitoring for privileged invitations created by non-administrative scopes
  • Policy enforcement requiring explicit authorization for super-admin delegation

Automated application-security and code-review tools may help identify inconsistent authorization checks, but workflow-specific tests are typically needed to validate scope enforcement.

Sources

SourceLink
github.comgithub.com/getgrav/grav/security/advisories/GHSA-wvpj-fg8h-843q
vulncheck.comvulncheck.com/advisories/grav-before-api-key-scope-bypass-via-invitationscontroller

Frequently asked

questions

It may be exploitable through the Grav Plugin API when the affected invitation workflow is exposed and the attacker possesses a qualifying authenticated API key. It is not generally an unauthenticated issue.

The attacker needs an API key capable of reaching the invitation-management functionality. The key may be narrowly scoped, but the vulnerable authorization logic can incorrectly rely on the associated account's super-admin status.

Enforce scope-aware, deny-by-default authorization for every privileged invitation field, and recheck those permissions when the invitation is accepted.

Treat API-key scopes as the effective authority, avoid trusting client-supplied privilege flags, add authorization tests for each scope combination, and monitor administrative invitation activity.

Find out what's already
exploitable in your codebase.