CVE-2021-21424
JSON

5.3medium

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

Severity
5.3medium CVSS:3.1 by GitHub_M
Exploit likelihood
1.64% (higher than 77% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-5pv8-ppvj-4h68BIT-SYMFONY-2021-21424

Description

Symfony is a PHP framework for web and console applications and a set of reusable PHP components. The ability to enumerate users was possible without relevant permissions due to different handling depending on whether the user existed or not when attempting to use the switch users functionality. We now ensure that 403s are returned whether the user exists or not if a user cannot switch to a user or if the user does not exist. The patch for this issue is available for branch 3.4.

Affected

Product or packageVersionsReported by
symfony symfony>= 2.8.0, < 3.4.48, >= 4.0.0, < 4.4.23, >= 5.0.0, < 5.2.8CVE List
symfony/security (Packagist)from 5.0.0 before 5.2.8, from 2.8.0 before 3.4.49, from 4.0.0 before 4.4.24GitHub Advisory Database
symfony/security-guard (Packagist)from 2.8.0 before 3.4.48, from 4.0.0 before 4.4.23, from 5.0.0 before 5.2.8GitHub Advisory Database
symfony/security-core (Packagist)from 2.8.0 before 3.4.48, from 4.0.0 before 4.4.23, from 5.0.0 before 5.2.8GitHub Advisory Database
lexik/jwt-authentication-bundle (Packagist)from 2.0.0 before 2.10.7, from 2.11.0 before 2.11.3GitHub Advisory Database
symfony/maker-bundle (Packagist)from 1.27.0 before 1.29.2, from 1.30.0 before 1.31.1GitHub Advisory Database
symfony/security-http (Packagist)from 5.1.0 before 5.2.8GitHub Advisory Database
symfony/symfony (Packagist)from 2.8.0 before 3.4.49, from 4.0.0 before 4.4.24, from 5.0.0 before 5.2.9GitHub Advisory Database
sensiolabs symfonyfrom 2.8.0 before 3.4.48, from 4.0.0 before 4.4.23, from 5.0.0 before 5.2.8NVD
fedoraproject fedora33, 34NVD
symfony (Bitnami)from 2.8.0 before 3.4.48, from 4.0.0 before 4.4.23, from 5.0.0 before 5.2.8Bitnami Vulnerability Database

All scores

GitHub_M5.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
GitHub5.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
NVD5.3medium CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
NVD5.0medium CVSS:2.0AV:N/AC:L/Au:N/C:P/I:N/A:N
Bitnami Vulnerability Databasemedium rating

Classification

What each source says

CVE List

Symfony is a PHP framework for web and console applications and a set of reusable PHP components. The ability to enumerate users was possible without relevant permissions due to different handling depending on whether the user existed or not when attempting to use the switch users functionality. We now ensure that 403s are returned whether the user exists or not if a user cannot switch to a user or if the user does not exist. The patch for this issue is available for branch 3.4.

GitHub Advisory Database

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.

NVD (es)

Symfony es un framework PHP para aplicaciones web y de consola y un conjunto de componentes PHP reutilizables.&#xa0;La capacidad de enumerar a los usuarios fue posible sin los permisos pertinentes debido al manejo diferente dependiendo de si el usuario existía o no al intentar usar la funcionalidad switch users.&#xa0;Ahora nos aseguramos de que los 403 sean retornados independientemente de que el usuario exista o no si un usuario no puede cambiar a un usuario o si el usuario no existe.&#xa0;El parche para este problema está disponible para la rama 3.4

References

https://github.com/symfony/symfony/security/advisories/GHSA-5pv8-ppvj-4h68patch, third-party-advisory, web
https://github.com/symfony/symfony/commit/2a581d22cc621b33d5464ed65c4bc2057f72f011patch, third-party-advisory, web
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/KENRNLB3FYXYGDWRBH2PDBOZZKOD7VY4/vendor-advisory, web
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/VRUS2H2SSOQWNLBD35SKIWIDQEMV2PD3/vendor-advisory, web
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/UC7BND775DVZDQT3RMGD2HVB2PKLJDJW/vendor-advisory, web
https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/RH7TMM5CHQYBFFGXWRPJDPB3SKCZXI2M/vendor-advisory, web
https://lists.debian.org/debian-lts-announce/2023/07/msg00014.htmlmailing-list, web
https://nvd.nist.gov/vuln/detail/CVE-2021-21424advisory
https://symfony.com/cve-2021-21424web
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/VRUS2H2SSOQWNLBD35SKIWIDQEMV2PD3web
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/UC7BND775DVZDQT3RMGD2HVB2PKLJDJWweb
https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/RH7TMM5CHQYBFFGXWRPJDPB3SKCZXI2Mweb

Sources

SourceRecordLicence
CVE ListCVE-2021-21424 changed 2024-08-03CVE Terms of Use
GitHub Advisory DatabaseGHSA-5pv8-ppvj-4h68 changed 2026-09-10CC-BY-4.0
NVDCVE-2021-21424 changed 2026-06-17Public domain
Bitnami Vulnerability DatabaseBIT-SYMFONY-2021-21424 changed 2024-03-06Apache-2.0