MediumGHSA-5pv8-ppvj-4h68BIT-symfony-2021-21424CVE-2021-21424

Prevent user enumeration using Guard or the new Authenticator-based Security

Published 13 May 2021 · Updated 10 Sept 2026

Affected packages

Affected
>=5.0.0 <5.2.8
Fixed in
5.2.8
Update to the fixed version for your release line, for example:composer require symfony/security:^5.2.8
Affected
>=2.8.0 <3.4.48
Fixed in
3.4.48
Update to the fixed version for your release line, for example:composer require symfony/security-guard:^3.4.48
Affected
>=4.0.0 <4.4.23
Fixed in
4.4.23
Update to the fixed version for your release line, for example:composer require symfony/security-guard:^4.4.23
Affected
>=5.0.0 <5.2.8
Fixed in
5.2.8
Update to the fixed version for your release line, for example:composer require symfony/security-guard:^5.2.8
Affected
>=2.8.0 <3.4.48
Fixed in
3.4.48
Update to the fixed version for your release line, for example:composer require symfony/security-core:^3.4.48
Affected
>=4.0.0 <4.4.23
Fixed in
4.4.23
Update to the fixed version for your release line, for example:composer require symfony/security-core:^4.4.23
Affected
>=5.0.0 <5.2.8
Fixed in
5.2.8
Update to the fixed version for your release line, for example:composer require symfony/security-core:^5.2.8
Affected
>=2.0.0 <2.10.7
Fixed in
2.10.7
Update to the fixed version for your release line, for example:composer require lexik/jwt-authentication-bundle:^2.10.7
Affected
>=2.11.0 <2.11.3
Fixed in
2.11.3
Update to the fixed version for your release line, for example:composer require lexik/jwt-authentication-bundle:^2.11.3
Affected
>=1.27.0 <1.29.2
Fixed in
1.29.2
Update to the fixed version for your release line, for example:composer require symfony/maker-bundle:^1.29.2
Affected
>=1.30.0 <1.31.1
Fixed in
1.31.1
Update to the fixed version for your release line, for example:composer require symfony/maker-bundle:^1.31.1
Affected
>=5.1.0 <5.2.8
Fixed in
5.2.8
Update to the fixed version for your release line, for example:composer require symfony/security-http:^5.2.8
Affected
>=2.8.0 <3.4.49
Fixed in
3.4.49
Update to the fixed version for your release line, for example:composer require symfony/security:^3.4.49
Affected
>=4.0.0 <4.4.24
Fixed in
4.4.24
Update to the fixed version for your release line, for example:composer require symfony/security:^4.4.24
Affected
>=2.8.0 <3.4.49
Fixed in
3.4.49
Update to the fixed version for your release line, for example:composer require symfony/symfony:^3.4.49
Affected
>=4.0.0 <4.4.24
Fixed in
4.4.24
Update to the fixed version for your release line, for example:composer require symfony/symfony:^4.4.24
Affected
>=5.0.0 <5.2.9
Fixed in
5.2.9
Update to the fixed version for your release line, for example:composer require symfony/symfony:^5.2.9

Details

Description -----------

The ability to enumerate users was possible without relevant permissions due to different exception messages depending on whether the user existed or not. It was also possible to enumerate users by using a timing attack, by comparing time elapsed when authenticating an existing user and authenticating a non-existing user.

Resolution ----------

We now ensure that 403s are returned whether the user exists or not if the password is invalid or if the user does not exist.

The patch for this issue is available here for branch 3.4.

Credits -------

I would like to thank James Isaac and Mathias Brodala for reporting the issue and Robin Chalas for fixing the issue.

Is GHSA-5pv8-ppvj-4h68 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, and gives you the command that fixes it.

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.