Description
The getgrav/grav-plugin-api Composer package before 1.0.13 (affected <= 1.0.12) fails to enforce API key scope caps on the disable2fa endpoint. Unlike the sibling generate2fa endpoint, disable2fa authorizes the admin (non-self) path solely via ACL reads (isSuperAdmin/hasPermission) and never invokes requirePermission(), so the api_key_scopes cap is never applied. As a result, a holder of a narrow-scope API key on a super account, or a non-super account whose ACL includes api.users.write, can force-disable two-factor authentication on any non-super target account via POST /api/v1/users/{user}/2fa/disable without providing a TOTP code, facilitating account takeover.
Published: 2026-08-14
Score: 9.3 Critical
EPSS: n/a
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The vulnerable Grav API allows an actor with a narrow‑scope API key to disable two‑factor authentication on any target user without providing a TOTP. The flaw results from the disable2fa endpoint bypassing API key scope caps and never invoking requirePermission. As a consequence, an attacker can force‑disable 2FA and gain unauthorized access as the target user, effectively taking over their account. This represents a severe identity compromise and is classified as CWE‑306.

Affected Systems

The issue affects the Grav CMS (getgrav:grav) and its grav‑plugin‑api package prior to version 1.0.13, specifically all releases up to and including 1.0.12. Administrators who rely on API keys that include api.users.write or that are tied to super‑admin accounts are vulnerable.

Risk and Exploitability

The CVSS score of 9.3 indicates critical severity. Although the EPSS score is unavailable, the lack of a TOTP requirement and reliance solely on API key scope create a straightforward exploitation path. An attacker possessing a valid API key with limited scopes can POST to /api/v1/users/{user}/2fa/disable and immediately remove two‑factor protection. The vulnerability is not listed in the CISA KEV catalog, but its high impact warrants rapid mitigation.

Generated by OpenCVE AI on August 14, 2026 at 12:27 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Upgrade Grav to version 1.0.13 or later
  • Revoke any API keys that possess api.users.write or are linked to super‑admin accounts and replace them with more restrictive keys
  • If an upgrade cannot be performed immediately, temporarily block external access to the /api/v1/users/…/2fa/disable endpoint or restrict API traffic via firewall rules

Generated by OpenCVE AI on August 14, 2026 at 12:27 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Fri, 14 Aug 2026 11:45:00 +0000

Type Values Removed Values Added
Description The getgrav/grav-plugin-api Composer package before 1.0.13 (affected <= 1.0.12) fails to enforce API key scope caps on the disable2fa endpoint. Unlike the sibling generate2fa endpoint, disable2fa authorizes the admin (non-self) path solely via ACL reads (isSuperAdmin/hasPermission) and never invokes requirePermission(), so the api_key_scopes cap is never applied. As a result, a holder of a narrow-scope API key on a super account, or a non-super account whose ACL includes api.users.write, can force-disable two-factor authentication on any non-super target account via POST /api/v1/users/{user}/2fa/disable without providing a TOTP code, facilitating account takeover.
Title Grav before 1.0.13 Authentication Bypass via disable2fa
First Time appeared Getgrav
Getgrav grav
Weaknesses CWE-306
CPEs cpe:2.3:a:getgrav:grav:*:*:*:*:*:*:*:*
Vendors & Products Getgrav
Getgrav grav
References
Metrics cvssV3_1

{'score': 9.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'}

cvssV4_0

{'score': 9.3, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N'}


cve-icon MITRE

Status: PUBLISHED

Assigner: VulnCheck

Published:

Updated: 2026-08-14T11:35:31.592Z

Reserved: 2026-08-10T15:12:59.508Z

Link: CVE-2026-72822

cve-icon Vulnrichment

No data.

cve-icon NVD

Status : Received

Published: 2026-08-14T12:16:45.267

Modified: 2026-08-14T12:16:45.267

Link: CVE-2026-72822

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-14T12:45:17Z

Weaknesses
  • CWE-306

    Missing Authentication for Critical Function