/

CVE-2026-126294

Severity:

HIGH RISK

(7.5)

Authentication Bypass (CWE-287) in Grav Login Plugin

CVE-2026-126294

Deferred

Vulnerability type

Category:

Authentication Bypass

CWE:

CWE-287

Impact:

Account takeover and unauthorized access

Severity:

HIGH RISK

(7.5)

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 has an authentication bypass that can let an attacker with an account password sign in without completing two-factor verification when the global twofa_enabled setting is off. The resulting session may be accepted by the API plugin, potentially granting the account's full permissions, including super-admin control.

Affected context

The issue affects Grav Login deployments where two-factor verification is expected but the global twofa_enabled setting is off. The described login paths include the /login form, remember-me cookies, and magic links; sessions obtained through these paths may be accepted by the API plugin.

Exploit preconditions

  • Attack surface: Grav Login authentication flows and session handling
  • Required access: The attacker must know the password for an account
  • Configuration condition: The global twofa_enabled setting must be off
  • Trigger point: Sign-in through the login form, a remember-me cookie, or a magic link
  • Why exploitation is possible: The authentication flow can issue a session without requiring the expected two-factor verification, and the API plugin accepts that session

Why this happens

The authentication flow does not consistently enforce the required verification step when the global two-factor setting is off. This is an authentication-mechanism failure mapped to CWE-287: Improper Authentication: a user's password can be sufficient to obtain an authenticated session even when additional verification is expected.

Potential impact

  • An attacker could access the victim account without completing two-factor verification
  • The session may grant the account's full permissions
  • An attacker could gain super-admin control if the compromised account has that role
  • The API plugin may accept the resulting session for unauthorized actions

General mitigation guidance

Mitigation patterns focus on consistently enforcing authentication requirements across every sign-in and session path.

  • Treat two-factor requirements as explicit authentication policy, not as an optional side effect of a global setting
  • Ensure form, remember-me, and magic-link flows apply equivalent verification and session controls
  • Validate that sessions represent completion of all required authentication steps before accepting them in plugins or APIs
  • Use least privilege for accounts and administrative roles
  • Reduce reliance on password-only access for sensitive accounts

How teams detect issues like this

  • Review authentication code paths for conditions where two-factor checks can be skipped or inferred from a global setting
  • Use static analysis and code review to identify inconsistent verification logic across login, cookie, and magic-link flows
  • Test that sessions lacking required verification are rejected by API and other plugin integrations
  • Enforce policy checks that require consistent multi-factor verification for privileged accounts
  • Monitor for sign-ins and sensitive API activity that do not show evidence of required verification

Sources

SourceLink
github.comgithub.com/getgrav/grav/security/advisories/GHSA-4x9h-4683-5fcx
vulncheck.comvulncheck.com/advisories/grav-login-plugin-before-3.11.0-two-factor-authentication-bypass-via-login

Frequently asked

questions

An attacker needs the password for an account, and the affected configuration condition must be present: the global twofa_enabled setting is off.

The described attack uses Grav Login authentication flows. Server access is not stated as a prerequisite, but the attacker does need valid account credentials.

Enforce required two-factor verification consistently before issuing an authenticated session, and ensure integrations accept only sessions that satisfy the authentication policy.

Treat authentication requirements as explicit policy and test every login and session path, including remember-me, magic-link, and API flows.

Find out what's already
exploitable in your codebase.