/

CVE-2026-72829

Severity:

HIGH RISK

(8.8)

API Scope Bypass (CWE-269) in Grav API Users Controller

CVE-2026-72829

Deferred

Vulnerability type

Category:

Privilege Escalation

CWE:

CWE-269

Impact:

Administrative Privilege Escalation and Account Takeover

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

A scope-enforcement flaw in the Grav API plugin allows an API key with only user-write permissions to bypass restrictions on super-privilege changes. When the key was created under a super account, an attacker who can use it may create or promote an account with unrestricted administrative access.

Affected context

The issue occurs in the Grav API plugin's user creation and update operations when authorization decisions for super privileges rely on the source account's super-admin status rather than the API key's assigned scopes. Deployments are at risk when a limited-scope key is minted from a super account and can reach these user-management endpoints.

Exploit preconditions

  • Attack surface: Grav API user-management endpoints
  • Required access: A valid API key with api.users.write scope, issued under a super account
  • Trigger point: User creation or update logic that handles access.api.super or super-granting group assignments
  • Why exploitation is possible: The scope cap is checked for ordinary user-write access, while super-privilege decisions consult a bare super-admin property without validating the key's effective scopes

Why this happens

The underlying bug is an authorization scope-confusion issue. The application treats the identity or account associated with an API key as sufficient evidence for granting a higher privilege, instead of evaluating the key's explicitly authorized capabilities for each sensitive operation.

This maps to CWE-269: Improper Privilege Management, because a lower-privilege API capability can influence a security-sensitive privilege assignment that should require separately authorized authority.

Potential impact

  • An attacker may create an account with unrestricted administrative privileges
  • An existing account could be promoted to a super account
  • The attacker could gain persistent administrative access to the Grav installation
  • Site content, configuration, users, and extensions could be modified
  • Administrative access could enable further compromise of connected services or data

General mitigation guidance

Mitigation generally focuses on enforcing authorization at the capability level for every sensitive operation.

Common defensive patterns include:

  • Evaluate the API key's effective scopes, rather than only the owning account's privileges
  • Require an explicit, separately authorized capability for super-account creation or promotion
  • Deny privilege-elevating fields and group assignments unless the request independently satisfies the required policy
  • Apply consistent authorization checks to both create and update paths
  • Use least-privilege API keys and avoid issuing broad keys for routine automation
  • Add server-side policy checks that prevent scope expansion through user-controlled attributes

How teams detect issues like this

Organizations can identify similar authorization flaws through:

  • Static analysis and code review of checks that read account roles without evaluating token or key scopes
  • Review of all endpoints that accept privilege-bearing fields, role assignments, or group membership changes
  • Authorization tests verifying that each API scope cannot perform operations outside its declared capability
  • Policy checks requiring explicit authorization before super-user creation or promotion
  • Audit monitoring for API-driven changes to administrative roles, super flags, and privileged groups
  • Automated security review tools that flag inconsistent authorization checks across create and update handlers

Sources

SourceLink
github.comgithub.com/getgrav/grav/security/advisories/GHSA-jrm3-jpp7-3gmx
vulncheck.comvulncheck.com/advisories/grav-before-api-key-scope-bypass-via-userscontroller

Frequently asked

questions

It may be exploitable remotely when the Grav API is accessible to an attacker and the attacker possesses a qualifying API key. The key's scope and the API's exposure determine the practical attack surface.

Exploitation requires a valid key with user-write capability that was issued under a super account, along with access to the affected user-management operations.

Enforce authorization using the API key's effective scopes for every privilege-sensitive action, and require a distinct authorization decision for super-account creation or promotion.

Model privileges as explicit capabilities, test each endpoint against narrowly scoped credentials, and monitor administrative role changes made through APIs.

Find out what's already
exploitable in your codebase.