CVE-2026-100667: grav-plugin-login 3.8.7 through 3.9.6 Two-Factor Authentication Bypass
grav-plugin-login (the Grav CMS Login plugin) versions >= 3.8.7 and < 3.9.7 allow the two-factor authentication challenge to be bypassed for content gated by the authenticated() Twig function or the [authenticated] shortcode. On sites with 2FA enabled, Login::isAuthenticated() checked only the session flag indicating that the password step had succeeded, not the flag indicating that login had completed, so a session sitting at the 2FA code prompt was treated as fully authenticated. An attacker who knows a member's password but cannot answer that member's second factor can therefore read member-only content rendered by the no-argument authenticated() or group authenticated(null, 'group') forms and by [authenticated]; the inverse [guest] shortcode is likewise evaluated too early. Impact is limited to disclosure of that content: the attacker does not obtain a completed session, cannot access pages protected by an access: rule, and cannot act as the user. The authenticated('some.permission') form, which goes through UserObject::authorize(), is not affected. Fixed in grav-plugin-login 3.9.7.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
grav-plugin-loginto a version that resolves this vulnerability.Fixed in 3.9.7
Event History
Frequently Asked Questions
Which deployments are exposed?
Sites using grav-plugin-login versions 3.8.7 through 3.9.6 are exposed only if two-factor authentication is enabled and member-only content is gated with the no-argument authenticated() Twig function, authenticated(null, 'group'), or the [authenticated] shortcode. Content protected with authenticated('some.permission') or an access: rule is not affected.
What must an attacker have to exploit this issue?
The attacker must know a member's password and reach the session state where the password step has succeeded but the 2FA prompt has not been completed. No valid second-factor response is required to read content protected by the affected checks.
What can an attacker access after bypassing the challenge?
The impact is limited to disclosure of content rendered by the affected Twig functions or shortcodes; the [guest] shortcode can also be evaluated too early. The attacker does not receive a completed session, cannot access pages protected by an access: rule, and cannot act as the user.
What should be done to remediate the issue?
Update grav-plugin-login to version 3.9.7, which fixes the issue. Until then, avoid relying on the affected no-argument or group authenticated checks and [authenticated] shortcode to protect sensitive content.