CVE-2026-107146: Why Brute-Force Defenses Need a Dead Session

A rate limit without a boundary

A six-digit TOTP code has a limited value space. Rate limiting reduces the number of guesses an attacker can make during the code's useful lifetime. CVE-2026-107146 adds a separate problem: a failed second-factor check could leave the authenticated server-side session alive. If the session survives, the attacker can keep presenting requests within the same password-authenticated context while attempting to solve the second factor.

The related weakness

CERT Polska published three issues in twofactor_gauthenticator. CVE-2026-107145 covers excessive authentication attempts. CVE-2026-107146 covers insufficient session expiration, CWE-613, and has a CVSS 4.0 score of 6.3. The same remediation commit, 4640889d71a25391d8814de826f39416bf3db08d, addresses the failed-attempt path and session teardown together. That grouping reflects an operational reality: retry controls work better when the failed state is well defined and temporary.

Attack scenario

An attacker needs a valid user password. With that password, the attacker reaches the plugin's 2FA prompt. A wrong code should end the pre-authentication state. In the vulnerable flow, the plugin removed its markers and sent a redirect but did not call the Roundcube session-killing function. A client that ignores the redirect may retain a session that the server still recognizes. The attacker can then make further verification attempts unless another control blocks them.

Detection gaps

A login dashboard may show a valid password event, while proxy logs show the redirect and application logs show failed 2FA messages. That combination can look like a completed logout. Investigators should correlate session identifiers, failed code counts and requests after the challenge. Client address resolution also matters when a reverse proxy forwards headers. The fixed plugin uses REMOTE_ADDR by default and honors X-Forwarded-For only from configured twofactor_trusted_proxies.

The remediation design

The patch calls rcmail::kill_session(), clears the remember-me cookie and removes plugin markers before redirecting. It also keeps a persistent failure counter outside the session so that teardown does not erase rate-limit history. The default delay schedule grows to 600 seconds and the counter expires after 900 seconds without a failure. These controls complement each other: one removes the stale session and the other limits repeated attempts.

Affected range and exposure

All plugin versions before commit 4640889 are affected. A ZoomEye query returned 61,963 Roundcube product matches and zero exact CVE matches. The product count cannot identify plugin usage. For risk ranking, combine external visibility with internal evidence that the plugin is active, that users have 2FA enabled and that the service accepts password logins from the internet.

Hardening beyond the patch

Apply the fixed revision and test an old session after a failed code. Alert on repeated failures for the same account and resolved IP, including requests that continue after a failed challenge. Protect password reset and recovery-code paths with equal care. If a password is suspected compromised, revoke active sessions and require a new password. Review reverse-proxy trust and log retention because both affect the quality of an investigation.

What the sources do not show

The advisory does not report confirmed exploitation of CVE-2026-107146 and does not provide a victim count. The technical effect is source-backed; the prevalence of vulnerable deployments is not. Treat the combination of password compromise, missing session destruction and weak retry limits as a credible risk scenario, while keeping those assumptions separate from confirmed incident evidence.

References