DEV Community

jeffrey
jeffrey

Posted on

Verifying the Roundcube 2FA Fix After Commit 4640889

Verifying the Roundcube 2FA Fix After Commit 4640889

A patch needs behavioral proof

CVE-2026-107145 affects the Roundcube twofactor_gauthenticator plugin. It is fixed by commit 4640889d71a25391d8814de826f39416bf3db08d, which changes authentication state handling rather than a single string comparison. A deployment check that only confirms a file exists is weak.

The fix must be tested through the login flow and the AJAX verification endpoint. It must also be tested after a failed logout, through a reverse proxy, and across repeated logins. Each check maps to a documented failure that existed before the commit.

Verify the deployed artifact

Record the plugin source, package version, and commit used to build each web node. The advisory lists all versions before 4640889 as vulnerable. If the plugin is copied into a container, confirm the running image digest and the file content in that image, not just the repository branch.

Compare local modifications with the upstream change. The fixed code adds a persistent state file under log_dir, options for twofactor_lockout_delays, twofactor_lockout, and twofactor_trusted_proxies, and a server-side session teardown. A local fork that lacks one of these changes may need further review.

Test failed-attempt persistence

Start with a test account. Submit an incorrect six-digit code through the normal login path. Observe the configured delay and confirm that another request is rejected as blocked for the remaining interval. Then start a new login sequence and verify that the failure level has not been reset by the previous logout.

Repeat the test through the AJAX check-code route. The upstream change requires an explicit secret for the self-test path and avoids returning a success or failure verdict while the account and source are blocked. Do not use a production account or a real user's TOTP secret for the test.

Check that a successful code clears the counter and that the counter expires after the configured window. Verify that the state file is written to the intended Roundcube log_dir with restrictive permissions.

Test session destruction

Use a test browser or HTTP client that is allowed to ignore redirects. Complete the password step, submit a wrong TOTP, and retain the original session cookie. Attempt to request an authenticated mailbox page with that cookie.

After the fixed code destroys the session server-side, the old identifier should not authorize the mailbox. A redirect to login is not sufficient evidence. Check that the remember-me cookie is cleared and that a fresh login is required.

Test proxy trust

Send a direct request with a forged Client-IP or X-Forwarded-For value. The application should use the real TCP peer and must not grant whitelist access from the forged value. When testing through an approved proxy, confirm that its address is included in twofactor_trusted_proxies and that the resolver chooses the expected client hop.

Run one test with an untrusted proxy and one with the intended proxy. Do not add broad ranges to make a test pass. A secure configuration should fail closed when the peer or forwarded chain is not recognized.

Measure residual exposure

The vulnerability requires the password and network access to the login path. The CNA record gives CVSS 4.0 a 6.3 Medium score. A test plan should include account recovery, session revocation, and mailbox rule review, not just the positive login case.

If the patch cannot be installed immediately, use gateway request limits and restrict access while maintaining an explicit remediation deadline. Review logs for repeated second-factor failures and unexpected whitelist bypasses. The advisory did not report public exploitation, but local telemetry determines whether suspicious activity occurred.

Account for related issues

The same advisory covers CVE-2026-107146 for session persistence and CVE-2026-107147 for spoofed client headers. A test that covers only CVE-2026-107145 can miss behavior that the commit also changes. Include all three checks in change verification and retain the evidence with the deployment record.

Exposure context

ZoomEye Search app="Roundcube" returned 61,971 product-fingerprint matches. The exact CVE Filter returned 0. This is useful for finding candidate deployments, but not for proving plugin installation or patch status. Verification starts with owned assets and their actual build artifacts.

References

Top comments (0)