Symfony's `Security::login` does not take into account custom `user_checker`
Published 6 Nov 2024 · Updated 7 Nov 2024
Affected packages
- Affected
- >=6.2.0 <6.4.10
- Fixed in
- 6.4.10
composer require symfony/security-bundle:^6.4.10- Affected
- >=7.0.0 <7.0.10
- Fixed in
- 7.0.10
composer require symfony/security-bundle:^7.0.10- Affected
- >=7.1.0 <7.1.3
- Fixed in
- 7.1.3
composer require symfony/security-bundle:^7.1.3- Affected
- >=6.2.0 <6.4.10
- Fixed in
- 6.4.10
composer require symfony/symfony:^6.4.10- Affected
- >=7.0.0 <7.0.10
- Fixed in
- 7.0.10
composer require symfony/symfony:^7.0.10- Affected
- >=7.1.0 <7.1.3
- Fixed in
- 7.1.3
composer require symfony/symfony:^7.1.3Details
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.
Is GHSA-jxgr-3v7q-3w9v in any of your client repos?
Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected symfony/security-bundle, and gives you the command that fixes it.
References
- Linkgithub.com/symfony/symfony/security/advisories/GHSA-jxgr-3v7q-3w9v
- Advisorynvd.nist.gov/vuln/detail/CVE-2024-50341
- Linkgithub.com/symfony/symfony/commit/22a0789a0085c3ee96f4ef715ecad8255cf0e105
- Linkgithub.com/FriendsOfPHP/security-advisories/blob/master/symfony/security-bundle/CVE-2024-50341.yaml
- Linkgithub.com/FriendsOfPHP/security-advisories/blob/master/symfony/symfony/CVE-2024-50341.yaml
- Packagegithub.com/symfony/symfony
- Linksymfony.com/cve-2024-50341
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.