Issue Feature New

#110727 Add rate limiting and failed-attempt logging to sudo-mode password verification

Torben Hansen 09/16/26, 17:16 updated 11/21/26, 13:02

Description

The sudo-mode password verification endpoint (SudoModeController::verifyAction, route sudo_mode_control → /typo3/ajax/sudo-mode/verify) accepts password guesses without any throttling and logs only successful verifications. Failed verifications are neither rate-limited nor logged, and the sudo claim stays valid for its full lifetime regardless of how many wrong passwords are submitted.

The backend login rate limiter (BackendUserAuthenticator::ensureLoginRateLimit) is gated on isActiveLogin() and does not cover this AJAX endpoint, so this step-up authentication check has no equivalent protection.

This is a hardening improvement (defense-in-depth) for an authenticated context. The endpoint itself still correctly rejects wrong passwords; the goal is to make repeated failed verification attempts costly and observable.

Suggested changes

- Throttle failed verifications, reusing the Symfony rate limiter, keyed per backend user (and IP).
- Log failed verification attempts (currently only successes are logged, at info level).
- On the install-tool-password path (useInstallToolPassword=1), emit a warning notification consistent with the install tool’s failed-login handling.
- Invalidate the sudo claim after a bounded number of failed attempts.

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.

Fix this issue

Start the commit message of your patch with this. Add what the patch does, and the versions it goes to in "Releases:". How to create a patch

Commit message
[FEATURE] Add rate limiting and failed-attempt logging to sudo-mode password verification Resolves: #110727 Releases: main

History 1

  1. Torben Hansen commented <span data-processor="relativetime" data-value="2026-11-21T13:02:07+00:00" > 11/21/26, 13:02 </span>

    Needs #111522, because admin users can flush the cache and thereby reset the rate limit