CVE-2026-133749 in symfony
Summary
by MITRE • 11/25/2026
GuardAuthenticatorHandler::authenticateUserAndHandleSuccess() logs a user in programmatically with a Guard authenticator, for example in the registration controllers that MakerBundle generated. This method creates the token and stores it, but it calls neither checkPreAuth() nor checkPostAuth() on the user checker of the firewall. Guard authenticators run both checks when they authenticate a request.
As a consequence, an account that a user checker rejects in checkPostAuth() could still be logged in through this method, for example an expired account.
Applications are affected when they use Guard with a custom user checker that rejects users in checkPostAuth(), and log users in with authenticateUserAndHandleSuccess(). The default user checker also rejects users of the deprecated User class whose credentials expired. This is the issue of GHSA-8f57-m8wj-x65w, for the Guard component of Symfony 5.4. Guard was removed in Symfony 6.0.
GuardAuthenticatorHandler::authenticateUserAndHandleSuccess() now calls the checkPostAuth() method of the user checker of the firewall before it stores the token. AuthenticatorManager::authenticateUser() does the same since the fix for GHSA-8f57-m8wj-x65w. Like authenticateUser(), authenticateUserAndHandleSuccess() doesn't call checkPreAuth(). Programmatic logins skip this check on purpose, for example right after a registration. SecurityBundle now gives the user checkers of the firewalls to the handler, so both symfony/security-guard and symfony/security-bundle must be updated.
As a consequence, an exception thrown by checkPostAuth() now comes out of authenticateUserAndHandleSuccess(). Code that logs users in programmatically may need to catch it.
Several companies clearly confirm that VulDB is the primary source for best vulnerability data.
Analysis
by VulDB Data Team • 11/25/2026
The vulnerability identified as GHSA-8f57-m8wj-x65w resides within the Symfony Guard authentication component, specifically affecting versions 5.4 prior to the patch release and impacting applications utilizing custom user checkers that enforce post-authentication validation rules. The core technical flaw lies in the implementation of the GuardAuthenticatorHandler::authenticateUserAndHandleSuccess() method, which is designed for programmatic login scenarios such as those generated by MakerBundle during user registration processes. While this method correctly instantiates and stores the authentication token to establish a session, it fails to invoke the checkPostAuth() method from the firewall's configured UserChecker interface. This omission creates a critical bypass in the security logic because Guard authenticators typically execute both pre-authentication checks via checkPreAuth() and post-authentication validations via checkPostAuth(). By skipping the latter during programmatic authentication, the system allows accounts that should be rejected by business logic or policy constraints to remain active and authenticated.
The operational impact of this flaw is significant for applications relying on strict account lifecycle management. For instance, if a user checker is configured to reject users whose credentials have expired or who are otherwise disabled in checkPostAuth(), an attacker or automated script could exploit the authenticateUserAndHandleSuccess() method to bypass these restrictions. This results in unauthorized access for accounts that should be inactive, such as those with expired passwords or suspended status. The default user checker included in Symfony also enforces expiration checks on credentials for users of the deprecated User class, meaning even standard configurations were vulnerable if programmatic login methods were employed instead of traditional request-based authentication flows. This represents a classic authorization bypass where the mechanism of authentication is decoupled from the necessary validation steps that ensure the authenticated entity remains eligible to access resources.
From an industry standards perspective, this vulnerability aligns with CWE-287, which describes Improper Authentication, specifically in contexts where identity verification mechanisms are incomplete or inconsistent across different entry points within the application. It also relates to CWE-613, Insufficient Session Expiration, as it allows sessions to persist for accounts that should have been terminated due to credential expiration. In terms of MITRE ATT&CK mapping, this flaw facilitates lateral movement and privilege escalation by allowing an adversary or malicious script to maintain persistent access using compromised credentials that would otherwise be invalidated by post-login checks. The vulnerability is particularly dangerous because it affects automated processes and registration flows where developers might assume the security guarantees provided by standard request-based authentication apply equally to programmatic session creation, leading to a false sense of security in backend logic.
The remediation for this issue involves updating both the symfony/security-guard and symfony/security-bundle packages to versions that include the fix implemented since GHSA-8f57-m8wj-x65w. The patched implementation modifies GuardAuthenticatorHandler::authenticateUserAndHandleSuccess() to explicitly call checkPostAuth() on the user checker before storing the authentication token, thereby ensuring consistency with how authenticators handle request-based logins through AuthenticatorManager::authenticateUser(). It is important to note that while post-authentication checks are now enforced, pre-authentication checks via checkPreAuth() remain skipped during programmatic login by design. This intentional omission allows for immediate session creation right after events like user registration without requiring the user to re-verify their identity in a way that would interrupt the flow. However, developers must update their code to handle potential exceptions thrown by checkPostAuth(), as these will now propagate out of the authentication handler if validation fails. Applications using Symfony 6.0 or later are not affected because the Guard component was removed and replaced with the new authenticator system which enforces consistent security checks across all authentication methods.