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 package | Versions | Reported by |
|---|---|---|
| symfony symfony | >= 2.8.0, < 3.4.48, >= 4.0.0, < 4.4.23, >= 5.0.0, < 5.2.8 | CVE 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.24 | GitHub 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.8 | GitHub 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.8 | GitHub Advisory Database |
| lexik/jwt-authentication-bundle (Packagist) | from 2.0.0 before 2.10.7, from 2.11.0 before 2.11.3 | GitHub Advisory Database |
| symfony/maker-bundle (Packagist) | from 1.27.0 before 1.29.2, from 1.30.0 before 1.31.1 | GitHub Advisory Database |
| symfony/security-http (Packagist) | from 5.1.0 before 5.2.8 | GitHub 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.9 | GitHub Advisory Database |
| sensiolabs symfony | from 2.8.0 before 3.4.48, from 4.0.0 before 4.4.23, from 5.0.0 before 5.2.8 | NVD |
| fedoraproject fedora | 33, 34 | NVD |
| 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.8 | Bitnami Vulnerability Database |
All scores
| GitHub_M | 5.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N |
| GitHub | 5.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N |
| NVD | 5.3medium CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N |
| NVD | 5.0medium CVSS:2.0 | AV:N/AC:L/Au:N/C:P/I:N/A:N |
| Bitnami Vulnerability Database | medium 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. 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. 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. El parche para este problema está disponible para la rama 3.4
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2021-21424 changed 2024-08-03 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-5pv8-ppvj-4h68 changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2021-21424 changed 2026-06-17 | Public domain |
| Bitnami Vulnerability Database | BIT-SYMFONY-2021-21424 changed 2024-03-06 | Apache-2.0 |