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

High severity, published 2026-09-02. Update getgrav/grav to 2.0.4 or later: composer update getgrav/grav.

Canonical URL: https://buzzphp.com/security/ghsa-7mgc-c7pq-3rr3 · Data from GitHub as of 2026-11-25.

| | |
| --- | --- |
| Severity | high (CVSS 7.4) |
| Published | 2026-09-02 |
| Updated | 2026-09-02 |
| CVE | [CVE-2026-62669](https://nvd.nist.gov/vuln/detail/CVE-2026-62669) |
| GHSA | [GHSA-7mgc-c7pq-3rr3](https://github.com/advisories/GHSA-7mgc-c7pq-3rr3) |
| Weakness | CWE-287 |

| Package | Affected versions | Fixed in |
| --- | --- | --- |
| getgrav/grav | < 2.0.4 | 2.0.4 |

## What to do

Update getgrav/grav to 2.0.4 or later: composer update getgrav/grav.

Check which version you run with `composer show getgrav/grav`, and every affected package with `composer audit`.

## About this advisory

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.

## Links

- [GHSA-7mgc-c7pq-3rr3 on GitHub](https://github.com/advisories/GHSA-7mgc-c7pq-3rr3)
- [CVE-2026-62669 on the National Vulnerability Database](https://nvd.nist.gov/vuln/detail/CVE-2026-62669)
- [All Composer security advisories](https://buzzphp.com/security)
