/

CVE-2026-109313

Severity:

HIGH RISK

(8.1)

Authentication Bypass (CWE-287) in Grav Login Plugin

CVE-2026-109313

Deferred

Vulnerability type

Category:

Authentication Bypass

CWE:

CWE-287

Impact:

Unauthorized account access and two-factor authentication bypass

Severity:

HIGH RISK

(8.1)

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

Grav Login plugin versions 2.7.0 through before 3.9.9 contain an authentication bypass involving remember-me cookie restoration. An attacker who has a valid password may obtain a persistent cookie after the password step and use it to restore a fully authorized session without completing two-factor authentication.

Grav Login plugin versions 2.7.0 through before 3.9.9 contain an authentication bypass involving remember-me cookie restoration. An attacker who has a valid password may obtain a persistent cookie after the password step and use it to restore a fully authorized session without completing two-factor authentication.

Affected context

The issue occurs in Grav deployments using the affected Login plugin versions with two-factor authentication and remember-me functionality enabled. Risk increases when a remember-me cookie issued after password verification can later be restored as a fully authenticated session without requiring the configured second factor.

The issue occurs in Grav deployments using the affected Login plugin versions with two-factor authentication and remember-me functionality enabled. Risk increases when a remember-me cookie issued after password verification can later be restored as a fully authenticated session without requiring the configured second factor.

Exploit preconditions

  • Attack surface: Login and remember-me session restoration
  • Required access: A valid account password, plus the ability to use or obtain the resulting remember-me cookie
  • Trigger point: Restoration of a persistent session through the remember-me mechanism
  • Why exploitation is possible: The restored session may be treated as fully authenticated even though two-factor verification was not completed
  • Attack surface: Login and remember-me session restoration
  • Required access: A valid account password, plus the ability to use or obtain the resulting remember-me cookie
  • Trigger point: Restoration of a persistent session through the remember-me mechanism
  • Why exploitation is possible: The restored session may be treated as fully authenticated even though two-factor verification was not completed

Why this happens

The underlying flaw is an authentication-state validation failure. The application permits a remember-me restoration flow to promote a password-verified session to a fully authorized state without preserving or rechecking the requirement for a second authentication factor. This behavior maps to CWE-287: Improper Authentication, because the system does not consistently enforce all required authentication steps before granting access.

The underlying flaw is an authentication-state validation failure. The application permits a remember-me restoration flow to promote a password-verified session to a fully authorized state without preserving or rechecking the requirement for a second authentication factor. This behavior maps to CWE-287: Improper Authentication, because the system does not consistently enforce all required authentication steps before granting access.

Potential impact

  • An attacker may bypass two-factor authentication for an account whose password is known
  • Unauthorized users could gain persistent access to protected account functions
  • Compromised remember-me cookies could enable session reuse
  • Account data or administrative capabilities could be exposed depending on the affected user's privileges
  • An attacker may bypass two-factor authentication for an account whose password is known
  • Unauthorized users could gain persistent access to protected account functions
  • Compromised remember-me cookies could enable session reuse
  • Account data or administrative capabilities could be exposed depending on the affected user's privileges

General mitigation guidance

Mitigation generally focuses on ensuring that every session-restoration path enforces the same authentication requirements as an interactive login.

Common defensive patterns include:

  • Treating remember-me restoration as a limited, explicitly tracked authentication state
  • Requiring two-factor verification before granting full session privileges
  • Binding persistent session tokens to narrowly scoped account and device context where appropriate
  • Revoking existing remember-me tokens when authentication settings or account credentials change
  • Applying least privilege so bypass of one account does not automatically expose broader administrative functions
  • Reducing trust in client-held cookies through secure attributes, rotation, expiration, and server-side validation

Mitigation generally focuses on ensuring that every session-restoration path enforces the same authentication requirements as an interactive login.

Common defensive patterns include:

  • Treating remember-me restoration as a limited, explicitly tracked authentication state
  • Requiring two-factor verification before granting full session privileges
  • Binding persistent session tokens to narrowly scoped account and device context where appropriate
  • Revoking existing remember-me tokens when authentication settings or account credentials change
  • Applying least privilege so bypass of one account does not automatically expose broader administrative functions
  • Reducing trust in client-held cookies through secure attributes, rotation, expiration, and server-side validation

How teams detect issues like this

Organizations can assess for this class of issue through:

  • Static analysis and code review of remember-me, session restoration, and two-factor state transitions
  • Checks that every authentication path records and enforces pending second-factor status
  • Dynamic tests verifying that restored sessions cannot access protected functions before two-factor completion
  • Monitoring for session restoration events that lack corresponding second-factor verification
  • Policy enforcement requiring secure cookie attributes, bounded token lifetimes, and server-side token revocation

Automated security testing and code review tools may help identify inconsistent authentication-state handling.

Organizations can assess for this class of issue through:

  • Static analysis and code review of remember-me, session restoration, and two-factor state transitions
  • Checks that every authentication path records and enforces pending second-factor status
  • Dynamic tests verifying that restored sessions cannot access protected functions before two-factor completion
  • Monitoring for session restoration events that lack corresponding second-factor verification
  • Policy enforcement requiring secure cookie attributes, bounded token lifetimes, and server-side token revocation

Automated security testing and code review tools may help identify inconsistent authentication-state handling.

Sources

SourceLink
github.comgithub.com/getgrav/grav/security/advisories/GHSA-cmg5-qw8p-gxcf
vulncheck.comvulncheck.com/advisories/grav-login-plugin-2.7.0-before-3.9.9-2fa-bypass-via-remember-me-cookie

Frequently asked

questions

It may be exploitable through the application's login and session-restoration endpoints when the affected remember-me flow is available. Exploitation still requires a valid password and access to the relevant persistent cookie.

No. The described weakness allows a qualifying remember-me session to be restored without completing the second-factor step.

Ensure that remember-me restoration cannot create a fully authenticated session until all configured authentication factors have been verified. Persistent tokens should also be validated and revocable on the server.

Model authentication states explicitly, test every login and session-restoration path, and monitor for access granted without the required second-factor event. Use short-lived, protected, and revocable session tokens where practical.

It may be exploitable through the application's login and session-restoration endpoints when the affected remember-me flow is available. Exploitation still requires a valid password and access to the relevant persistent cookie.

No. The described weakness allows a qualifying remember-me session to be restored without completing the second-factor step.

Ensure that remember-me restoration cannot create a fully authenticated session until all configured authentication factors have been verified. Persistent tokens should also be validated and revocable on the server.

Model authentication states explicitly, test every login and session-restoration path, and monitor for access granted without the required second-factor event. Use short-lived, protected, and revocable session tokens where practical.

Find out what's already
exploitable in your codebase.