# GHSA-JJ4M-PCR9-QJRM: Programmatic Logins With Guard Skip the checkPostAuth() Method of User Checkers

- Database: GitHub
- Severity: CVSS 2.3 (Low)
- Published: 2026-11-25
- Modified: 2026-11-25

## Tracked as

- [CVE-2026-133749](https://cve.now/CVE-2026-133749.md): Symfony Security Bundle authentication bypass in Guard programmatic logins

## Affected versions

- symfony/security-bundle (Packagist): fixed in 5.4.57
- symfony/security-guard (Packagist): fixed in 5.4.57
- symfony/symfony (Packagist): fixed in 5.4.57

## Description

### Description

`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.

### Resolution

`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.

The patch for this issue is available [here](https://github.com/symfony/symfony/commit/997321301543935ccfb62d8053472cf0a5d12354) for branch 5.4.

### Credits

We would like to thank Nicolas Grekas for reporting the issue and providing the fix.

## References

- https://github.com/symfony/symfony/security/advisories/GHSA-jj4m-pcr9-qjrm

Page: https://cve.now/GHSA-JJ4M-PCR9-QJRM

Wrong or missing data? Send feedback: POST https://cve.now/api/v1/feedback (see https://cve.now/agents#feedback).
