Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObtain victim's Grav password
-
DeliverySubmit password to create pending TOTP session
-
ExploitPOST taskRegenerate2FASecret() during challenge window
-
ExecutionRead new 2FA secret from server response
-
PersistCompute valid TOTP code
-
ImpactComplete login bypassing victim's 2FA device
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A07:2025 - Authentication Failures
ASVS 5.0
V6 - Authentication Authentication mechanism validation
MITRE ATT&CK
2 techniques across 2 tactics: Defense Evasion, Initial Access The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | The attacker must possess the target account's valid password - this is the dominant prerequisite and the primary limiting factor. Two-factor authentication (TOTP) must be enabled for the targeted Grav account; accounts without 2FA are unaffected by this specific bypass. The attack must be executed during the pending session window between successful password submission and session timeout, imposing a timing constraint. Prior to the patch, no CSRF nonce was required, so the regenerate task could be invoked with a simple POST carrying only the session cookie - no user interaction by the victim was needed. Exploitation is not limited by server-side configuration beyond 2FA being enabled. The CVSS PR:N rating is accurate because the attacker creates their own pending session using the victim's credentials rather than hijacking an existing authorized session. |
| Impact | The CVSS 7.4 score (AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N) accurately reflects the attack profile: fully remote and requiring no interaction, but constrained by AC:H because the attacker must independently possess the victim's password. EPSS data and KEV status are absent from the provided intelligence, so exploitation probability cannot be quantified and no confirmed mass exploitation is known. The impact is severe for affected deployments: this is a complete 2FA bypass yielding account takeover equivalent to full credential compromise, negating the entire second-factor control. The primary real-world risk moderator is the password prerequisite - this is a defense-layer collapse attack, not a credential-free attack. Organizations relying on Grav's 2FA as their primary defense against credential stuffing or phishing should treat this as urgent, since that control is entirely negated. The discovery of the secondary CSRF vector in the same patch suggests the endpoint was historically poorly hardened. |
| Exploit ScenarioDerived | An attacker who has obtained a target's Grav password via phishing or credential stuffing submits that password to initiate a login session, landing in the pending TOTP challenge state. Before entering any TOTP code, the attacker sends a crafted POST to the login controller invoking task=regenerate2FASecret, which overwrites the victim's stored TOTP secret and returns the new secret in the HTTP response. The attacker computes a valid TOTP code from the returned secret and immediately completes login, gaining full account access while the victim's authenticator app becomes permanently invalid. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Aug 19, 2026
Two-factor authentication bypass in Grav Login Plugin prior to 3.8.11 allows an attacker who possesses a victim's password to completely circumvent TOTP enforcement. By invoking the taskRegenerate2FASecret() endpoint during the pending login window - when the session exists but is not yet authorized - the attacker overwrites the victim's 2FA secret, reads the replacement from the server response, computes a valid code, and completes authentication without the victim's physical device. No public exploit has been identified at time of analysis and the vulnerability is not in CISA KEV, but the attack primitive is explicitly confirmed by vendor advisory GHSA-7mgc-c7pq-3rr3 and the commit diff.
RemediationAI
Upgrade grav-plugin-login to version 3.8.11, available at https://github.com/getgrav/grav-plugin-login/releases/tag/3.8.11, and upgrade Grav core to version 2.0.4 or later per EUVD-2026-62540. The fix enforces $user->authorized === true in taskRegenerate2FASecret() and requires a valid POST request with a login-form-nonce CSRF token. If immediate upgrade is not feasible, block POST requests to the Grav login controller containing task=regenerate2FASecret at the web server or WAF layer - note this prevents legitimate users from re-enrolling or regenerating their 2FA QR code from the profile page, which may be an acceptable trade-off. Additionally, restricting Grav admin and login endpoints to known IP ranges via web server access controls reduces the attack surface, though it does not eliminate risk for shared or VPN environments.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 3 packages in composer, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
Grav is a flat-file CMS; the Login Plugin handles authentication, basic ACL, and session management. The flaw resides in Controller.php's taskRegenerate2FASecret() function (CPE: cpe:2.3:a:getgrav:grav-plugin-login:*:*:*:*:*:*:*:*), which gated 2FA secret regeneration solely on $user->exists(). Grav's two-step login flow sets the session user to an 'authenticated but not authorized' state - authorized = false - while awaiting TOTP completion. CWE-287 (Improper Authentication) precisely captures the root cause: the system equated session user existence with full authorization. The commit diff further reveals a secondary CSRF vulnerability (also addressed in 3.8.11): the regenerate endpoint was reachable via HTTP GET with SameSite=Lax cookies and no nonce, enabling cross-site triggering. The fix adds both the $user->authorized === true gate and POST-method-plus-nonce enforcement.
Know when Grav gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N
AC:H reflects the mandatory prerequisite of possessing the victim's password; PR:N because the attacker self-authenticates using stolen credentials; A:N as no availability impact is present.
Primary rating from Vendor (GitHub_M).
CVSS VectorVendor: GitHub_M
Lifecycle Timeline
2DescriptionCVE.org
Grav Login Plugin adds login, basic ACL, and session wide messages to Grav. Prior to 3.8.11, the Grav Login plugin login.regenerate2FASecret task checks only that the pending-session user exists rather than requiring $user->authorized. After submitting a victim's correct password, an attacker can invoke taskRegenerate2FASecret() during the pending TOTP challenge, overwrite twofa_secret, read the replacement secret from the response, calculate a valid code, and complete authentication without the victim's second factor. This issue is fixed in version 3.8.11.
Executive ViewAI
The Grav Login Plugin (versions prior to 3.8.11) contains a vulnerability that completely bypasses two-factor authentication when an attacker has a user's password, converting a compromised credential into full account access. Organizations using this plugin must patch immediately, as this directly undermines a core security control. No public exploit has been identified at time of analysis.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.
Server-side template injection (SSTI) in Grav (getgrav/grav) prior to 1.8.0-beta.27 allows an authenticated attacker hol
Broken access control in Grav CMS (CWE-285) before 1.8.0-beta.27 lets an authenticated editor-level user escalate their
A Remote Code Execution (RCE) vulnerability in Grav CMS v1.7.48 allows an authenticated admin to upload a malicious plug
Grav is a file-based Web platform. Rated critical severity (CVSS 9.9), this vulnerability is remotely exploitable, low a
GravCMS 1.10.7 allows unauthenticated remote attackers to write arbitrary YAML configuration files, leading to full serv
Remote code execution in Grav CMS 2.0.4 (fixed in 2.0.7) lets an authenticated user holding the admin.pages or api.pages
Remote code execution in Grav CMS before 2.0.15 allows attackers holding page-edit or blueprint-config privileges to wri
Vertical privilege escalation in Grav CMS before 2.0.14 lets a delegated administrator holding only the admin.users perm
Stored cross-site scripting in Grav CMS before 2.0.15 lets authenticated editors smuggle JavaScript event handlers past
Server-side request forgery (SSRF) in Grav CMS versions prior to 1.7.49.5 allows remote authenticated attackers to make
Grav is a file-based Web platform. Prior to 1.8.0-beta.27, Grav CMS is vulnerable to a Server-Side Template Injection (S
Remote code execution in Grav CMS before 2.0.13 allows authenticated low-privilege users to plant and execute arbitrary
EUVD-2026-62540
GHSA-7mgc-c7pq-3rr3
NVD
CVE.org
EPSS
Vulnrichment
VulDB
Exploit-DB