Skip to content
Low 2.3

Symfony: Programmatic Logins Skip the checkPostAuth() Method of User Checkers

CVE-2026-123746 First seen on SecPulse

Affected packages

PackageAffected → Fixed
sensiolabssymfony
< 5.4.56→ 5.4.56
≥ 6.0.0, < 6.4.50→ 6.4.50
≥ 7.0.0, < 7.4.23→ 7.4.23
≥ 8.0.0, < 8.1.11→ 8.1.11
composersymfony/security-http
< 8.1.11→ 8.1.11
composersymfony/symfony
< 8.1.11→ 8.1.11
Packagistsymfony/security-http
≥ 8.0.0, < 8.1.11→ 8.1.11
Packagistsymfony/symfony
≥ 8.0.0, < 8.1.11→ 8.1.11

Fix status by distribution

Records published by each distribution for this CVE. Fixed versions differ by release; check each link.

Original description The description as published by the source.

Description

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.

Resolution

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 ne…

Source: CVE.org (CVE Program・cvelistV5) NVD GitHub Advisory

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details