ZeroHour

CVE-2026-62669

niche

Grav CMS Login Plugin 2FA Bypass via Secret Rotation During Pending Challenge

CVSS 3.1
7.4 high
EPSS
<1%p32
Published
()
Modified
AI analysis

Grav CMS's Login plugin (v3.8.10 confirmed) allows the login.regenerate2FASecret task to run during the 2FA pending-challenge window with only a user-existence check, no authorization check and no CSRF nonce, overwriting the account's stored TOTP secret on disk and returning the new secret in the JSON response. An attacker who already holds valid account credentials logs in to reach the pending-2FA state, sends a single request to the task, reads the returned secret, and computes a valid TOTP code to complete the login. This effectively reduces the second factor to password-only, granting full authenticated access to the affected account with confidentiality and integrity impact (CVSS 7.4 high). Only Grav CMS sites running the Login plugin with TOTP 2FA enabled on accounts are affected. No broad exploitation is known so far: EPSS is 0.4%, the flaw is not in CISA KEV, and no public PoC is known beyond the researcher's live confirmation on a test instance.

What to do: Upgrade the Grav CMS Login plugin to a release newer than 3.8.10 as soon as a patched version is published (the source data does not specify a fixed version). Until patched, consider disabling TOTP 2FA in the Login plugin or restricting site exposure, and review user accounts for unexpected twofa_secret changes. Because the attack requires valid credentials, enforce strong passwords and rotate any credentials suspected of being compromised.

Affected
Grav Login plugin for Grav CMS3.8.10 confirmed affected (vulnerable code path present; affected and fixed version ranges not specified in source data)
Estimated exposure
nicheplausibly on the order of thousands of sites at most (Grav is a low-share flat-file CMS and only Login-plugin accounts with TOTP 2FA enabled are exposed) — No install-count data was provided; Grav CMS is a niche flat-file CMS, the flaw is confined to Login-plugin accounts with TOTP 2FA enabled, and exploitation additionally requires the attacker to already possess valid credentials.

Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.

Description

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.

Ecosystems
composer
Weakness
CWE-287
Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:N
GHSA
GHSA-7mgc-c7pq-3rr3 (high)

In the news

No ingested article mentions this CVE yet.