Symfony's `Security::login` does not take into account custom `user_checker`
Impact
The custom user_checker defined on a firewall is not called when Login Programmaticaly with the Security::login method, leading to unwanted login.
Source excerpt · OSVAffected packages
Start with the recorded fix for your release branch. Check your installed version and test compatibility before upgrading. Fixing this advisory does not rule out other vulnerabilities in the release.
| Affected range | Recorded fix |
|---|---|
| From 6.2.0 before 6.4.10Ecosystem versions | 6.4.10 |
| From 7.0.0 before 7.0.10Ecosystem versions | 7.0.10 |
| From 7.1.0 before 7.1.3Ecosystem versions | 7.1.3 |
Version evidence: OSV · GHSA-jxgr-3v7q-3w9v
View original version evidence (51 explicit versions)
| Affected range | Recorded fix |
|---|---|
| From 6.2.0 before 6.4.10Ecosystem versions | 6.4.10 |
| From 7.0.0 before 7.0.10Ecosystem versions | 7.0.10 |
| From 7.1.0 before 7.1.3Ecosystem versions | 7.1.3 |
Version evidence: OSV · GHSA-jxgr-3v7q-3w9v
View original version evidence (61 explicit versions)
Original source description
Description
The custom user_checker defined on a firewall is not called when Login Programmaticaly with the Security::login method, leading to unwanted login.
Resolution
The Security::login method now ensure to call the configured user_checker.
The patch for this issue is available here for branch 6.4.
Credits
We would like to thank Oleg Andreyev, Antoine MAKDESSI for reporting the issue and Christian Flothmann for providing the fix.
References
- Security advisory github.com/symfony/symfony/security/advisories/GHSA-jxgr-3v7q-3w9v
- Security advisory nvd.nist.gov/vuln/detail/CVE-2024-50341
- Patch github.com/symfony/symfony/commit/22a0789a0085c3ee96f4ef715ecad8255cf0e105
- Security advisory github.com/FriendsOfPHP/security-advisories/blob/master/symfony/security-bundle/CVE-2024-50341.yaml
- Security advisory github.com/FriendsOfPHP/security-advisories/blob/master/symfony/symfony/CVE-2024-50341.yaml
- Source reference github.com/symfony/symfony
- Security advisory symfony.com/cve-2024-50341