/

CVE-2026-109317

Severity:

HIGH RISK

(7.2)

Improper Privilege Management (CWE-269) in Grav API

CVE-2026-109317

Deferred

Vulnerability type

Category:

Improper Privilege Management

CWE:

CWE-269

Impact:

Privilege Escalation to Super-Administrator Access

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's API plugin contains a privilege escalation flaw in delegated user management, where certain parent permission grants can be interpreted as satisfying super-administrator checks. An attacker who already has api.users.write access may be able to alter account access maps or invitations and reach API functions reserved for super administrators.

Grav's API plugin contains a privilege escalation flaw in delegated user management, where certain parent permission grants can be interpreted as satisfying super-administrator checks. An attacker who already has api.users.write access may be able to alter account access maps or invitations and reach API functions reserved for super administrators.

Affected context

The issue may occur in Grav deployments using the grav-plugin-api with delegated user managers and permission inheritance for account or invitation administration. Risk is higher when users holding api.users.write can modify access maps or invitations that are later evaluated by authorization checks for super-administrator-only API endpoints.

The issue may occur in Grav deployments using the grav-plugin-api with delegated user managers and permission inheritance for account or invitation administration. Risk is higher when users holding api.users.write can modify access maps or invitations that are later evaluated by authorization checks for super-administrator-only API endpoints.

Exploit preconditions

  • Attack surface: Grav API account and invitation management functionality
  • Required access: An authenticated account with api.users.write
  • Trigger point: Authorization evaluation after changes to account access maps or invitations
  • Why exploitation is possible: Positive scalar parent grants may be interpreted as satisfying requireSuper checks, allowing delegated permissions to cross an administrative boundary
  • Attack surface: Grav API account and invitation management functionality
  • Required access: An authenticated account with api.users.write
  • Trigger point: Authorization evaluation after changes to account access maps or invitations
  • Why exploitation is possible: Positive scalar parent grants may be interpreted as satisfying requireSuper checks, allowing delegated permissions to cross an administrative boundary

Why this happens

The underlying bug is an authorization and privilege-inheritance design error. Permission values stored in account or invitation access maps are resolved in a way that can treat positive scalar grants for administrative or API parent permissions as equivalent to the requirements of a super-admin check. This violates least-privilege boundaries and maps to CWE-269, Improper Privilege Management, because a lower-privileged delegated manager can obtain capabilities intended only for a higher-privileged role.

The underlying bug is an authorization and privilege-inheritance design error. Permission values stored in account or invitation access maps are resolved in a way that can treat positive scalar grants for administrative or API parent permissions as equivalent to the requirements of a super-admin check. This violates least-privilege boundaries and maps to CWE-269, Improper Privilege Management, because a lower-privileged delegated manager can obtain capabilities intended only for a higher-privileged role.

Potential impact

  • An attacker may access super-administrator-only API endpoints.
  • Account permissions or invitations could be altered beyond the actor's intended authority.
  • Administrative users or service access could be created or modified.
  • Sensitive configuration or user data could be exposed or changed.
  • The Grav installation could be further compromised through privileged API operations.
  • An attacker may access super-administrator-only API endpoints.
  • Account permissions or invitations could be altered beyond the actor's intended authority.
  • Administrative users or service access could be created or modified.
  • Sensitive configuration or user data could be exposed or changed.
  • The Grav installation could be further compromised through privileged API operations.

General mitigation guidance

Mitigation generally focuses on making authorization decisions explicit,

fail-closed, and independent of ambiguous inherited permission values.

Common defensive patterns include:

  • Separating delegated user-management permissions from super-administrator privileges.
  • Treating parent grants and scalar permission values according to a strict, documented schema.
  • Requiring an explicit super-administrator capability for requireSuper checks.
  • Validating and normalizing account access maps and invitations before authorization evaluation.
  • Limiting which roles may edit permissions, invitations, and role-inheritance metadata.
  • Applying least privilege to API accounts and reviewing existing delegated-manager assignments.
  • Recording and alerting on changes to privileged access maps and invitations.

Mitigation generally focuses on making authorization decisions explicit,

fail-closed, and independent of ambiguous inherited permission values.

Common defensive patterns include:

  • Separating delegated user-management permissions from super-administrator privileges.
  • Treating parent grants and scalar permission values according to a strict, documented schema.
  • Requiring an explicit super-administrator capability for requireSuper checks.
  • Validating and normalizing account access maps and invitations before authorization evaluation.
  • Limiting which roles may edit permissions, invitations, and role-inheritance metadata.
  • Applying least privilege to API accounts and reviewing existing delegated-manager assignments.
  • Recording and alerting on changes to privileged access maps and invitations.

How teams detect issues like this

Organizations can look for this class of issue through:

  • Static analysis and code review of permission-resolution and role-inheritance logic.
  • Tests that verify delegated roles cannot satisfy super-administrator authorization checks.
  • Review signals involving truthy scalar values used as substitutes for explicit capabilities.
  • Policy checks requiring privileged operations to use centralized, fail-closed authorization.
  • Audit-log analysis for unusual changes to account access maps, invitations, or privileged API activity.
  • Automated security review tools that identify inconsistent privilege checks and authorization-boundary crossings.

Organizations can look for this class of issue through:

  • Static analysis and code review of permission-resolution and role-inheritance logic.
  • Tests that verify delegated roles cannot satisfy super-administrator authorization checks.
  • Review signals involving truthy scalar values used as substitutes for explicit capabilities.
  • Policy checks requiring privileged operations to use centralized, fail-closed authorization.
  • Audit-log analysis for unusual changes to account access maps, invitations, or privileged API activity.
  • Automated security review tools that identify inconsistent privilege checks and authorization-boundary crossings.

Sources

SourceLink
github.comgithub.com/getgrav/grav/security/advisories/GHSA-m2rq-76vx-vv4j
vulncheck.comvulncheck.com/advisories/grav-api-plugin-before-1.0.36-privilege-escalation-via-scalar-access-grants

Frequently asked

questions

Exploitation generally requires an authenticated user who already has

api.users.write or an equivalent delegated user-management capability.

Typically not. The relevant API operations require access to the Grav

installation and sufficient permissions to modify account access maps or

invitations.

Enforce explicit, fail-closed authorization for super-administrator

operations, and ensure inherited or scalar grants cannot substitute for an

explicit super-admin capability.

Use centralized permission evaluation, strict schemas for role inheritance,

least-privilege role design, regression tests for privilege boundaries, and

monitoring of administrative permission changes.

Exploitation generally requires an authenticated user who already has

api.users.write or an equivalent delegated user-management capability.

Typically not. The relevant API operations require access to the Grav

installation and sufficient permissions to modify account access maps or

invitations.

Enforce explicit, fail-closed authorization for super-administrator

operations, and ensure inherited or scalar grants cannot substitute for an

explicit super-admin capability.

Use centralized permission evaluation, strict schemas for role inheritance,

least-privilege role design, regression tests for privilege boundaries, and

monitoring of administrative permission changes.

Find out what's already
exploitable in your codebase.