BuzzPHP
LightDarkSystem

Grav: 2FA Bypass via 'login.regenerate2FASecret' - Secret Rotation During Pending Challenge

High severity. Published 2 September 2026. Update getgrav/grav to 2.0.4 or later: composer update getgrav/grav.

Which versions are affected?

PackageAffected versionsFixed in
getgrav/grav (opens in a new tab)< 2.0.42.0.4

What should you do?

Update every affected package you use to its fixed version, then check that nothing else in your project matches an advisory. To see which version you run, and whether anything is still affected:

composer show getgrav/grav
composer audit

Advisory details

SeverityHighCVSS 7.4
Published
Updated
CVECVE-2026-62669 (opens in a new tab)
GHSAGHSA-7mgc-c7pq-3rr3 (opens in a new tab)
WeaknessCWE-287

What the advisory says

Summary When 2FA is enabled on an account, submitting correct credentials authenticates the user but leaves them unauthorized pending TOTP verification. During this pending-challenge window, the login.regenerate2FASecret task which requires only $user-exists(), not $user-authorized can be called without a CSRF nonce. It overwrites the victim's twofasecret on disk with an attacker-chosen value, returns the new secret in the JSON response, and the attacker computes a valid TOTP code to complete the 2FA flow. The second factor is reduced to password-only. The exploit was confirmed live after enabling 2FA to a user.

Details Four code locations in login plugin v3.8.10 enable the chain:

1.

Source: GHSA-7mgc-c7pq-3rr3 (opens in a new tab) in the GitHub Advisory Database (CC BY 4.0). Data from GitHub (opens in a new tab) as of .

Other recent advisories for this package

All Composer security advisories