Summary
A high-severity authentication bypass in the Grav Login plugin can allow a user who knows a victim's password to continue account access without completing front-end two-factor authentication. The issue becomes risky when an attacker can publish or invoke an unrestricted page form that reaches the user-profile update handler.
A high-severity authentication bypass in the Grav Login plugin can allow a user who knows a victim's password to continue account access without completing front-end two-factor authentication. The issue becomes risky when an attacker can publish or invoke an unrestricted page form that reaches the user-profile update handler.
Affected context
The vulnerability affects Grav Login deployments in which the user-profile update workflow can be reached through a published front-end form without an applicable access rule. The vulnerable logic recognizes that a session user exists but does not sufficiently verify that a pending front-end two-factor authentication session has completed authorization before allowing security settings to be changed.
The vulnerability affects Grav Login deployments in which the user-profile update workflow can be reached through a published front-end form without an applicable access rule. The vulnerable logic recognizes that a session user exists but does not sufficiently verify that a pending front-end two-factor authentication session has completed authorization before allowing security settings to be changed.
Exploit preconditions
- Attack surface: Published front-end user-profile or page-form functionality
- Required access: Knowledge of the victim's password and the ability to reach an applicable form or endpoint
- Trigger point: User-profile processing during the account update workflow
- Authorization state: A pending two-factor authentication challenge exists but has not been completed
- Why exploitation is possible: The handler checks session identity without enforcing full two-factor authorization before accepting changes to account security settings
- Attack surface: Published front-end user-profile or page-form functionality
- Required access: Knowledge of the victim's password and the ability to reach an applicable form or endpoint
- Trigger point: User-profile processing during the account update workflow
- Authorization state: A pending two-factor authentication challenge exists but has not been completed
- Why exploitation is possible: The handler checks session identity without enforcing full two-factor authorization before accepting changes to account security settings
Why this happens
The underlying flaw is an incomplete authorization check in the user-profile processing path. The application treats the presence of an authenticated session user as sufficient authorization, even when the session remains subject to an unfinished front-end two-factor authentication challenge. This maps to CWE-287: Improper Authentication, because the workflow permits access to protected account operations without validating the complete authentication state.
The underlying flaw is an incomplete authorization check in the user-profile processing path. The application treats the presence of an authenticated session user as sufficient authorization, even when the session remains subject to an unfinished front-end two-factor authentication challenge. This maps to CWE-287: Improper Authentication, because the workflow permits access to protected account operations without validating the complete authentication state.
Potential impact
- An attacker may disable two-factor authentication on a victim's account
- An attacker could complete account takeover after obtaining or reusing the victim's password
- Unauthorized changes may be made to profile or security settings
- Compromised accounts could be used to access protected site content or administrative workflows
- Organizations may experience loss of account integrity and increased phishing or data-exposure risk
- An attacker may disable two-factor authentication on a victim's account
- An attacker could complete account takeover after obtaining or reusing the victim's password
- Unauthorized changes may be made to profile or security settings
- Compromised accounts could be used to access protected site content or administrative workflows
- Organizations may experience loss of account integrity and increased phishing or data-exposure risk
General mitigation guidance
Mitigation generally focuses on enforcing authentication state consistently across every account-management operation.
Common defensive patterns include:
- Require successful completion of all configured authentication factors before permitting security-sensitive profile changes
- Apply centralized authorization checks to user-profile update handlers and equivalent endpoints
- Treat pending two-factor sessions as unauthenticated for privileged account-management actions
- Require reauthentication or step-up verification when changing two-factor settings or recovery controls
- Restrict page-form publication and access rules using least-privilege defaults
- Reduce reliance on client-controlled or loosely scoped session state
Mitigation generally focuses on enforcing authentication state consistently across every account-management operation.
Common defensive patterns include:
- Require successful completion of all configured authentication factors before permitting security-sensitive profile changes
- Apply centralized authorization checks to user-profile update handlers and equivalent endpoints
- Treat pending two-factor sessions as unauthenticated for privileged account-management actions
- Require reauthentication or step-up verification when changing two-factor settings or recovery controls
- Restrict page-form publication and access rules using least-privilege defaults
- Reduce reliance on client-controlled or loosely scoped session state
How teams detect issues like this
Organizations can look for this class of issue through:
- Static analysis and code review checks for profile-update handlers that test session existence without validating completed authentication factors
- Review of all endpoints that modify two-factor, password, recovery, or other account-security settings
- Tests that attempt sensitive account changes during incomplete or partially authorized authentication flows
- Monitoring for two-factor disablement followed by unusual login activity, password use, or profile changes
- Policy enforcement requiring centralized authorization middleware for security-sensitive account operations
- Automated security testing and code review tools that identify inconsistent authentication-state checks
Organizations can look for this class of issue through:
- Static analysis and code review checks for profile-update handlers that test session existence without validating completed authentication factors
- Review of all endpoints that modify two-factor, password, recovery, or other account-security settings
- Tests that attempt sensitive account changes during incomplete or partially authorized authentication flows
- Monitoring for two-factor disablement followed by unusual login activity, password use, or profile changes
- Policy enforcement requiring centralized authorization middleware for security-sensitive account operations
- Automated security testing and code review tools that identify inconsistent authentication-state checks

