The vulnerability is a user enumeration timing attack. The response time for a login attempt differed depending on whether the user existed or not, because password hashing was only performed for valid users. An attacker could abuse this timing difference to confirm the existence of usernames.
The patch addresses this by introducing a new authenticator, Mautic\UserBundle\Security\TimingSafeFormLoginAuthenticator. This class decorates the original form login authenticator.
The key change is in the authenticate method of this new class. It wraps the user loading process in a try-catch block. If a UserNotFoundException is caught (meaning the user does not exist), it proceeds to perform a dummy password hash verification using a hardcoded hash. This ensures that the execution time is similar for both existing and non-existing users, thus mitigating the timing attack vector.
The identified function, Mautic\UserBundle\Security\TimingSafeFormLoginAuthenticator::authenticate, is the direct implementation of the fix and is the function that would now appear in a runtime profile during a login attempt. While this function itself is the patch, it is the most critical function to be aware of in the context of this vulnerability, as its presence indicates that the system is patched.