/

CVE-2026-72830

Severity:

HIGH RISK

(8.8)

Improper Privilege Management (CWE-269) in Grav API

CVE-2026-72830

Deferred

Vulnerability type

Category:

Improper Privilege Management

CWE:

CWE-269

Impact:

Remote Code Execution

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 API plugin versions before 1.0.13 do not consistently enforce scope restrictions when processing certain ConfigController super-scope gates. An attacker with a scoped api.config.write key may modify scheduler configuration and inject commands that execute through Symfony Process, potentially resulting in remote code execution.

Affected context

The vulnerability occurs in Grav deployments using the API plugin where scoped API keys can reach scheduler configuration functionality. It becomes risky when the api.config.write permission is granted without effective enforcement of the intended scope caps, allowing scheduler job definitions to be written and later executed by the application.

Exploit preconditions

  • Attack surface: Grav API configuration-management endpoints
  • Required access: A valid scoped API key with api.config.write permission
  • Trigger point: Writing scheduler configuration through the ConfigController and subsequent scheduler execution
  • Why exploitation is possible: Super-scope authorization checks fail to cap the effective permissions of scoped keys, allowing configuration changes beyond the key's intended authority

Why this happens

The underlying issue is improper privilege management caused by incomplete enforcement of authorization scope boundaries. A scoped API credential can pass a super-scope gate and modify scheduler settings despite lacking the broader authority normally required for that operation. This maps to CWE-269: Improper Privilege Management, where a system assigns, maintains, or checks privileges incorrectly and permits an operation outside the intended authorization boundary.

Potential impact

  • Attackers may execute arbitrary commands on the Grav host
  • The application and its underlying operating environment could be compromised
  • Sensitive application data may be accessed or modified
  • Credentials and deployment secrets may be exposed
  • The server could be used for persistence, lateral movement, or service disruption

General mitigation guidance

Mitigation generally focuses on enforcing authorization boundaries consistently across every configuration-management path.

Common defensive patterns include:

  • Apply deny-by-default scope checks before processing configuration writes
  • Ensure super-scope gates cannot expand a scoped key's effective permissions
  • Separate scheduler administration from general configuration-writing privileges
  • Validate and constrain scheduler job definitions using an allowlisted schema
  • Avoid passing user-controlled command content to process execution APIs
  • Use fixed executable and argument mappings instead of dynamic command strings
  • Store API keys securely, rotate them when exposure is suspected, and grant only necessary privileges
  • Run the application with a least-privileged operating-system account and restricted filesystem access

How teams detect issues like this

Detection can combine authorization testing, code review, and runtime monitoring:

  • Use static analysis to identify authorization gates that combine scopes inconsistently or grant broader permissions through fallback paths
  • Review controller methods that write scheduler, command, or process-execution configuration
  • Test each API key scope against every configuration endpoint, including super-scope and inherited-permission paths
  • Monitor audit logs for scheduler configuration changes made by scoped credentials
  • Alert on unexpected changes to job definitions or process invocations originating from the web application
  • Enforce policy checks in CI that require explicit authorization decisions for privileged configuration operations
  • Automated security review tools may help identify missing privilege checks and unsafe command construction

Sources

SourceLink
github.comgithub.com/getgrav/grav/security/advisories/GHSA-2x29-3mjq-2pvx
vulncheck.comvulncheck.com/advisories/grav-api-plugin-before-rce-via-configcontroller-scope-bypass

Frequently asked

questions

It can be remotely exploitable when the Grav API is accessible to an attacker who possesses or obtains a scoped API key with api.config.write permission.

Not necessarily. The issue specifically concerns scoped credentials whose permissions are not correctly capped by the affected authorization gates.

Enforce least-privilege authorization at every configuration-write path, prevent scoped keys from crossing privilege boundaries, and use allowlisted scheduler definitions rather than dynamic command content.

Maintain centralized, deny-by-default authorization checks; test permission boundaries for every API scope; monitor privileged configuration changes; and run application processes with minimal operating-system privileges.

Find out what's already
exploitable in your codebase.