Security::login() and UserAuthenticatorInterface::authenticateUser() log a user in programmatically, for example after a password reset or after an email verification link. The fix for CVE-2024-50341 made Security::login() call the checkPreAuth() method of the user checker of the firewall. But neither method ran checkPostAuth(): this method runs on the security.authentication.success event, which AuthenticatorManager::authenticateUser() did not dispatch.
As a consequence, an account that a user checker rejects in checkPostAuth(), such as an expired account, was refused by form login and the other authenticators of the firewall, but could still be logged in through these methods.
Applications are affected when they use a custom user checker that rejects users in checkPostAuth() and log users in programmatically. On 6.4 and up, the default user checker does nothing in checkPostAuth(). On 5.4, it rejects users of the deprecated User class whose credentials expired.
AuthenticatorManager::authenticateUser() now dispatches the security.authentication.success event once the token is created and before it is stored, as authentications through the firewall do. checkPostAuth() runs on this event and can reject the user.
As a consequence, an exception thrown by checkPostAuth() now comes out of Security::login() and authenticateUser(). Code that logs users in programmatically, such as a registration controller, may need to catch it.
UserAuthenticatorInterface::authenticateUser() still doesn't call checkPreAuth(), on purpose. That's where checks like "the email isn't verified yet" usually are, and registration controllers use this method to log in users that just registered.
The patches for this issue are available here for branch 5.4 (and forward-ported to 6.4, 7.4, 8.1 and 8.2).
Symfony would like to thank Vincent Cassiau (CyberVanguard) for reporting the issue and Nicolas Grekas for providing the fix.
Symfony would also like to thank Bruno Dias from Checkmarx for their help getting a CVE assigned.
{
"cwe_ids": [
"CWE-287",
"CWE-288"
],
"github_reviewed": true,
"github_reviewed_at": "2026-12-01T21:45:52Z",
"nvd_published_at": "2026-11-06T13:17:29Z",
"severity": "LOW"
}