Horizon Alert
Summary of the vulnerability and why it matters
This advisory concerns a flaw in a Grav CMS API plugin that could allow unauthorized disabling of multi-factor authentication, potentially leading to account takeover. The vulnerability stems from insufficient access controls on a specific endpoint, enabling attackers to bypass security requirements. Understanding the potential for unauthorized access is key for leadership to assess risk.
- Security flaw allows bypassing multi-factor authentication.
- It could lead to unauthorized account access.
- Assess exposure and confirm relevance to your systems.
Attack Path
How an attacker could exploit the issue
An attacker can exploit this vulnerability by sending a specially crafted POST request to the disable2fa endpoint. This bypasses the need for a Two-Factor Authentication (2FA) code and allows an attacker to disable 2FA on a target account. The vulnerability lies in how the API key scope is handled, specifically that it's not enforced for disabling 2FA, potentially leading to unauthorized account access.
- No special access or authentication needed.
- Triggered by a POST request to disable2fa.
- Risk of unauthorized account takeover.
Live Threat
Current exploitation, exposure, and threat context
This vulnerability could allow an attacker to disable two-factor authentication (2FA) for non-super user accounts. This is possible when an attacker holds a narrow-scope API key on a super account, or a non-super account with specific write permissions. By sending a POST request to the `/api/v1/users/{user}/2fa/disable` endpoint without a TOTP code, an attacker could bypass the standard 2FA verification and facilitate account takeover.
- User accounts without super admin status.
- Bypassing 2FA via a crafted API request.
- Potential for unauthorized account takeover.
Operational Fix
Recommended remediation, mitigation, and detection steps
This vulnerability impacts the getgrav/grav-plugin-api Composer package, specifically related to API key scope enforcement for disabling two-factor authentication. It allows unauthorized users to disable 2FA on other accounts, potentially leading to account takeover. Action should be initiated by the team responsible for the Grav CMS deployment, likely application owners or platform teams. The first step is to identify all instances of the affected package, assess their exposure and business criticality, and then plan remediation, possibly involving vendor coordination.
- Identify affected Grav CMS instances.
- Verify API key scope configurations.
- Plan remediation based on risk.