Read the docs

Programmatic logins in Symfony Guard skip user checker post-auth checks

Priority LOW 13CWE-287Published · Updated

Key facts

Attack vector
Network
Privileges required
Low
User interaction
None
Attack complexity
Low
Attack requirements
Present
Impact type
Security bypass
Confidentiality · integrity · availability
None · Low · None
Fix status
Fixed

Attack profile from CVSS 4.0 · CNA. Fix status from CNA. Impact type from CWE-287.

Summary

Symfony symfony/symfony, symfony/security-bundle and symfony/security-guard before 5.4.57 are affected. The method authenticateUserAndHandleSuccess() in the Guard handler skips checkPostAuth() of the firewall's user checker, an improper authentication flaw (CWE-287). A low-privileged remote user could log in to an account that the user checker rejects, such as an expired account, in applications that use Guard with a custom user checker and programmatic logins.

Written with Claude Haiku 5.5 from the sources below · 2026-11-25

Description from the CNA

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.

Why it matters now

EPSS 0.00533 38th percentileScored 2026-11-30
Fix Fixed symfony/security-bundle (Symfony): 5.4.57symfony/security-guard (Symfony): 5.4.57+1 more product

SSVC decision points

Not available: CISA has not published SSVC decision points for this record.

Affected products

VendorProductAffected versionsFixed inStatusSource
symfonysymfony/security-bundlebefore 5.4.575.4.57Patch availableCNA
symfonysymfony/security-guardbefore 5.4.575.4.57Patch availableCNA
symfonysymfony/symfonybefore 5.4.575.4.57Patch availableCNA
  • symfony/security-bundle Vendorsymfony Affected before 5.4.57 Fixed in 5.4.57 Patch available CNA
  • symfony/security-guard Vendorsymfony Affected before 5.4.57 Fixed in 5.4.57 Patch available CNA
  • symfony/symfony Vendorsymfony Affected before 5.4.57 Fixed in 5.4.57 Patch available CNA

Remediation

Update symfony/security-bundle, symfony/security-guard and symfony/symfony to 5.4.57. Code that logs users in programmatically may need to catch the exception that checkPostAuth() now throws out of authenticateUserAndHandleSuccess().

Written with Claude Haiku 5.5 from the sources below · 2026-11-25

  • Fix · CNA symfony/security-bundle (Symfony) Fixed in 5.4.57
  • Fix · CNA symfony/security-guard (Symfony) Fixed in 5.4.57
  • Fix · CNA symfony/symfony (Symfony) Fixed in 5.4.57

Timeline

  1. 2026-11-25 Threatist record created from CVE-2026-133749

References

  • TI-2026-34283 Twig: The `spaceless` filter implicitly marks its output as safe CVSS 4.0MEDIUM 5.1
  • TI-2022-07667 Code injection in Twig CVSS 3.1CRITICAL 9.8
  • TI-2018-10028 Twig before 2.4.4 allows Server-Side Template Injection (SSTI) via the search search_key… CVSS 3.0CRITICAL 9.8
  • TI-2022-08704 Symfony storing cookie headers in HttpCache CVSS 3.1HIGH 8.8
  • TI-2026-98149 Symfony Serializer CSV Header Nesting Without Limit Crashes PHP CVSS 4.0HIGH 8.7
  • TI-2026-98148 Nested short ternaries make the Symfony expression parser hang CVSS 4.0HIGH 8.7
See all 129 →

Sources

This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences