Skip to main content
Vulnerability Database/CVE-2026-109312

CVE-2026-109312: Grav Login Plugin Auth Bypass Vulnerability

CVE-2026-109312 is an authentication bypass flaw in Grav Login plugin versions 2.7.0 to 3.9.8 that allows attackers to disable two-factor authentication during login. This post explains its impact, affected versions, and mitigation steps.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2026-109312 Overview

CVE-2026-109312 is an authentication bypass vulnerability in the Grav Login plugin, affecting versions 2.7.0 before 3.9.9. The flaw resides in the processUserProfile() function, which verifies the session user exists but fails to confirm that a pending front-end two-factor authentication (2FA) session has been fully authorized. An attacker who possesses a victim's password and can publish a page form without an access rule can invoke update_user before completing 2FA. This action disables the twofa_enabled flag and allows full account takeover. The vulnerability is categorized under [CWE-287: Improper Authentication].

Critical Impact

Attackers with stolen credentials can bypass 2FA entirely by submitting a crafted profile update, disabling the second factor and taking over target accounts.

Affected Products

  • Grav CMS Login plugin version 2.7.0 and later
  • Grav CMS Login plugin versions prior to 3.9.9
  • Grav installations exposing page forms without access rules

Discovery Timeline

  • 2026-10-12 - CVE-2026-109312 published to the National Vulnerability Database (NVD)
  • 2026-10-15 - Last updated in NVD database

Technical Details for CVE-2026-109312

Vulnerability Analysis

The Grav Login plugin implements 2FA as a two-stage authentication process. Stage one validates username and password. Stage two requires a valid time-based one-time password (TOTP) before the session is considered fully authorized.

The processUserProfile() handler, which processes updates submitted through front-end profile forms, only verifies that a user is bound to the current session. It does not inspect the pending 2FA state. As a result, a half-authenticated session created by valid credentials but without a completed TOTP challenge is treated as privileged enough to modify user attributes.

An attacker who knows the victim's password can authenticate to stage one, then submit a profile update form that calls update_user with twofa_enabled set to false. The second factor is removed server-side, and the attacker can re-authenticate without the TOTP requirement.

Root Cause

The root cause is a missing authorization check in processUserProfile(). The handler trusts that any user object attached to the session has completed authentication, violating the principle that state-changing operations must validate full authentication status, not merely identity presence.

Attack Vector

Exploitation requires network access to a Grav site running an affected Login plugin version, a valid username and password for the target account, and a published page containing a user profile form without an access rule restricting it to fully authenticated users. The attacker submits the form between stage-one credential submission and stage-two TOTP validation to disable 2FA on the victim account.

No verified public proof-of-concept code is available. See the GitHub Security Advisory GHSA-5rph-jqcf-2x36 and the VulnCheck Advisory on Grav Plugin 2FA Bypass for additional technical analysis.

Detect Identity Attacks the Moment Authentication Fails

Singularity™ Identity surfaces credential misuse, lateral movement, and privilege escalation in real time, so you can contain the breach before it spreads.

Stop Identity Attacks

Detection Methods for CVE-2026-109312

Indicators of Compromise

  • User account records showing twofa_enabled transitioning from true to false without a corresponding administrator action or user-initiated preference change in audit logs.
  • Web server access logs containing POST requests to pages hosting user profile forms immediately following a login POST but before any TOTP verification request.
  • Successful logins from new source IP addresses to accounts that previously required 2FA, within minutes of a profile update event.

Detection Strategies

  • Correlate authentication events with user profile modifications to identify sessions that updated twofa_enabled without completing a TOTP challenge in the same session.
  • Monitor the Grav user YAML files under user/accounts/ for unexpected changes to the twofa_enabled field.
  • Alert on any update_user action originating from a session that has not emitted a successful 2FA verification event.

Monitoring Recommendations

  • Enable verbose logging on the Grav Login plugin and forward authentication and profile update events to a centralized logging platform.
  • Baseline normal 2FA enrollment and disablement rates per tenant; alert on statistical deviations.
  • Review published page definitions for forms that invoke update_user and flag any lacking an access rule.

How to Mitigate CVE-2026-109312

Immediate Actions Required

  • Upgrade the Grav Login plugin to version 3.9.9 or later on all Grav installations.
  • Audit all accounts with 2FA previously enabled and re-enable the second factor where it has been silently disabled.
  • Force password resets for any accounts suspected of credential compromise.

Patch Information

The maintainers released a fix in Grav Login plugin version 3.9.9. The patch adds a check in processUserProfile() to ensure the current session has completed any pending 2FA challenge before processing profile updates. Refer to the GitHub Security Advisory GHSA-5rph-jqcf-2x36 for upgrade instructions.

Workarounds

  • Remove or unpublish any front-end page forms that call update_user until the plugin is upgraded.
  • Add an access rule to all profile forms requiring site.login or stricter, so that half-authenticated sessions cannot submit them.
  • Enforce administrative review of 2FA state changes by alerting on modifications to the twofa_enabled attribute in user account files.
bash
# Example Grav page frontmatter restricting a profile form to authenticated users
---
title: Profile
access:
  site.login: true
---

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.