/

CVE-2026-65007

Severity:

CRITICAL RISK

(9.6)

Missing Authorization (CWE-862) in Grav API Plugin

CVE-2026-65007

Deferred

Vulnerability type

Category:

Missing Authorization

CWE:

CWE-862

Impact:

Privilege Escalation and Account Takeover

Severity:

CRITICAL RISK

(9.6)

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

The Grav API plugin before 1.0.8 mishandles authorization for API key generation and revocation, checking only a baseline admin login permission instead of full account management privileges.

As a result, any authenticated panel user with admin.login can mint persistent API keys for other accounts and inherit their API-level permissions, enabling impersonation and potential account takeover on API-enabled installs.

The Grav API plugin before 1.0.8 mishandles authorization for API key generation and revocation, checking only a baseline admin login permission instead of full account management privileges.

As a result, any authenticated panel user with admin.login can mint persistent API keys for other accounts and inherit their API-level permissions, enabling impersonation and potential account takeover on API-enabled installs.

Affected context

This vulnerability appears in Grav installs that use the grav-plugin-api prior to version 1.0.8 and expose API key management through the admin panel.

It is most relevant where:

  • Multiple users have the baseline admin.login permission
  • API keys are used for automation or integrations
  • At least one API-enabled account holds broader or more sensitive permissions than standard panel users

Under these conditions, API key issuance and revocation become a cross-account control that can be abused for impersonation.

This vulnerability appears in Grav installs that use the grav-plugin-api prior to version 1.0.8 and expose API key management through the admin panel.

It is most relevant where:

  • Multiple users have the baseline admin.login permission
  • API keys are used for automation or integrations
  • At least one API-enabled account holds broader or more sensitive permissions than standard panel users

Under these conditions, API key issuance and revocation become a cross-account control that can be abused for impersonation.

Exploit preconditions

  • Attack surface: Grav admin panel with the API plugin enabled and API key management tasks exposed.
  • Required access: Any authenticated account holding the admin.login permission (i.e., basic admin panel access).
  • Trigger point: Invocation of the apiKeyGenerate or apiKeyRevoke admin tasks targeting a chosen account.
  • Why exploitation is possible: The plugin intercepts these tasks and authorizes them solely on the presence of admin.login, bypassing the intended account-management ACL, so callers are not required to own or manage the target account.
  • Attack surface: Grav admin panel with the API plugin enabled and API key management tasks exposed.
  • Required access: Any authenticated account holding the admin.login permission (i.e., basic admin panel access).
  • Trigger point: Invocation of the apiKeyGenerate or apiKeyRevoke admin tasks targeting a chosen account.
  • Why exploitation is possible: The plugin intercepts these tasks and authorizes them solely on the presence of admin.login, bypassing the intended account-management ACL, so callers are not required to own or manage the target account.

Why this happens

The core issue is a broken authorization workflow where sensitive operations are validated against an overly broad, low-privilege capability.

The Grav API plugin hooks into admin tasks for API key generation and revocation but performs its own permission check based only on the admin.login right, which is common to all panel users.

This design bypasses the stricter account-management access control that should govern who can create or revoke keys for specific accounts, aligning with CWE-862: Missing Authorization, where the application fails to enforce adequate permission checks on privileged actions.

The core issue is a broken authorization workflow where sensitive operations are validated against an overly broad, low-privilege capability.

The Grav API plugin hooks into admin tasks for API key generation and revocation but performs its own permission check based only on the admin.login right, which is common to all panel users.

This design bypasses the stricter account-management access control that should govern who can create or revoke keys for specific accounts, aligning with CWE-862: Missing Authorization, where the application fails to enforce adequate permission checks on privileged actions.

Potential impact

  • An attacker with admin.login may mint a persistent API key for any API-enabled account.
  • Attackers could impersonate higher-privileged accounts via forged API tokens.
  • Privilege escalation can occur from basic panel access to full account takeover of API-enabled administrators.
  • Long-lived API keys may enable offline abuse, integration hijacking, or data exfiltration.
  • Misuse of escalated API access can lead to configuration tampering and broader application compromise.
  • An attacker with admin.login may mint a persistent API key for any API-enabled account.
  • Attackers could impersonate higher-privileged accounts via forged API tokens.
  • Privilege escalation can occur from basic panel access to full account takeover of API-enabled administrators.
  • Long-lived API keys may enable offline abuse, integration hijacking, or data exfiltration.
  • Misuse of escalated API access can lead to configuration tampering and broader application compromise.

General mitigation guidance

Effective mitigation centers on enforcing strict, role-appropriate authorization for all sensitive account-linked operations.

Recommended design patterns include:

  • Ensuring API key generation and revocation are guarded by the same account-management ACLs used for password changes, role assignments, and user administration.
  • Treating API keys as authentication proxies and gating their lifecycle with high-privilege checks and explicit ownership validation.
  • Structuring plugin hooks so they defer to core authorization layers rather than duplicating or weakening permission checks.
  • Minimizing the number of accounts with API capabilities and using least privilege in API roles and scopes.
  • Logging and monitoring API key lifecycle events to detect abnormal cross-account key creation or revocation.

Effective mitigation centers on enforcing strict, role-appropriate authorization for all sensitive account-linked operations.

Recommended design patterns include:

  • Ensuring API key generation and revocation are guarded by the same account-management ACLs used for password changes, role assignments, and user administration.
  • Treating API keys as authentication proxies and gating their lifecycle with high-privilege checks and explicit ownership validation.
  • Structuring plugin hooks so they defer to core authorization layers rather than duplicating or weakening permission checks.
  • Minimizing the number of accounts with API capabilities and using least privilege in API roles and scopes.
  • Logging and monitoring API key lifecycle events to detect abnormal cross-account key creation or revocation.

How teams detect issues like this

Detection commonly focuses on both configuration review and behavioral signals:

  • Reviewing plugin and admin task codepaths for operations that bypass or short-circuit central ACL checks.
  • Using static analysis or policy-based code review to flag sensitive actions (e.g., token issuance, account changes) that rely on generic permissions like "login" instead of granular authorization.
  • Auditing admin panel logs for patterns where lower-privileged accounts initiate API key generation or revocation for other users.
  • Employing configuration assessment tools to identify plugins that implement their own authorization logic rather than delegating to the core framework.

Detection commonly focuses on both configuration review and behavioral signals:

  • Reviewing plugin and admin task codepaths for operations that bypass or short-circuit central ACL checks.
  • Using static analysis or policy-based code review to flag sensitive actions (e.g., token issuance, account changes) that rely on generic permissions like "login" instead of granular authorization.
  • Auditing admin panel logs for patterns where lower-privileged accounts initiate API key generation or revocation for other users.
  • Employing configuration assessment tools to identify plugins that implement their own authorization logic rather than delegating to the core framework.

Sources

SourceLink
github.comgithub.com/getgrav/grav/security/advisories/GHSA-7v74-m76q-8wf3
vulncheck.comvulncheck.com/advisories/grav-before-missing-authorization-on-api-key-generation

Frequently asked

questions

Exploitation is broad wherever multiple users have admin.login access. Any such user can issue API keys for other accounts, so environments with many panel users and API-enabled accounts are particularly exposed.

The attacker needs only an authenticated Grav admin panel account with the baseline admin.login permission. They do not need existing ownership of the target account whose API key they intend to forge.

The robust fix is to ensure that all sensitive account-related operations, including API key lifecycle management, are consistently enforced by centralized account-management ACLs and ownership checks, rather than relying on minimal login-level permissions or plugin-specific shortcuts.

Developers can prevent similar problems by standardizing on a single authorization layer for privileged actions, applying least privilege to roles and scopes, requiring explicit identity and ownership checks for cross-account operations, and incorporating security-focused code review or automated checks targeting permission handling patterns.

Exploitation is broad wherever multiple users have admin.login access. Any such user can issue API keys for other accounts, so environments with many panel users and API-enabled accounts are particularly exposed.

The attacker needs only an authenticated Grav admin panel account with the baseline admin.login permission. They do not need existing ownership of the target account whose API key they intend to forge.

The robust fix is to ensure that all sensitive account-related operations, including API key lifecycle management, are consistently enforced by centralized account-management ACLs and ownership checks, rather than relying on minimal login-level permissions or plugin-specific shortcuts.

Developers can prevent similar problems by standardizing on a single authorization layer for privileged actions, applying least privilege to roles and scopes, requiring explicit identity and ownership checks for cross-account operations, and incorporating security-focused code review or automated checks targeting permission handling patterns.

Find out what's already
exploitable in your codebase.