CVE-2021-21424

CVE-2021-21424 is a medium-severity security vulnerability in symfony/security (composer), affecting versions >= 5.0.0, < 5.2.8. It is fixed in 5.2.8, 3.4.48, 4.4.23, 2.10.7, 2.11.3, 1.29.2, 1.31.1, 3.4.49, 4.4.24, 5.2.9.

Does this CVE actually affect you?

Kodem shows which CVEs are reachable and running in your applications, so you fix what's exploitable, not just what's listed.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Runtime intelligence, not another scanner.

Summary

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

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.

Impact

CVE-2021-21424 has a CVSS score of 5.3 (Medium). The vector is network-reachable, no privileges required, and no user interaction. A CVSS score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether this affects your application depends on whether the vulnerable code is present and reachable in your environment. A fixed version is available (5.2.8, 3.4.48, 4.4.23, 2.10.7, 2.11.3, 1.29.2, 1.31.1, 3.4.49, 4.4.24, 5.2.9); upgrading removes the vulnerable code path.

Affected versions

symfony/security (>= 5.0.0, < 5.2.8) symfony/security-guard (>= 2.8.0, < 3.4.48) symfony/security-guard (>= 4.0.0, < 4.4.23) symfony/security-guard (>= 5.0.0, < 5.2.8) symfony/security-core (>= 2.8.0, < 3.4.48) symfony/security-core (>= 4.0.0, < 4.4.23) symfony/security-core (>= 5.0.0, < 5.2.8) lexik/jwt-authentication-bundle (>= 2.0.0, < 2.10.7) lexik/jwt-authentication-bundle (>= 2.11.0, < 2.11.3) symfony/maker-bundle (>= 1.27.0, < 1.29.2) symfony/maker-bundle (>= 1.30.0, < 1.31.1) symfony/security-http (>= 5.1.0, < 5.2.8) symfony/security (>= 2.8.0, < 3.4.49) symfony/security (>= 4.0.0, < 4.4.24) symfony/symfony (>= 2.8.0, < 3.4.49) symfony/symfony (>= 4.0.0, < 4.4.24) symfony/symfony (>= 5.0.0, < 5.2.9)

Security releases

symfony/security → 5.2.8 (composer) symfony/security-guard → 3.4.48 (composer) symfony/security-guard → 4.4.23 (composer) symfony/security-guard → 5.2.8 (composer) symfony/security-core → 3.4.48 (composer) symfony/security-core → 4.4.23 (composer) symfony/security-core → 5.2.8 (composer) lexik/jwt-authentication-bundle → 2.10.7 (composer) lexik/jwt-authentication-bundle → 2.11.3 (composer) symfony/maker-bundle → 1.29.2 (composer) symfony/maker-bundle → 1.31.1 (composer) symfony/security-http → 5.2.8 (composer) symfony/security → 3.4.49 (composer) symfony/security → 4.4.24 (composer) symfony/symfony → 3.4.49 (composer) symfony/symfony → 4.4.24 (composer) symfony/symfony → 5.2.9 (composer)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

Already deployed Kodem?

See it in your environmentNew to Kodem? Get a demo →

Remediation advice

Upgrade the following packages to resolve this vulnerability:

symfony/security to 5.2.8 or later; symfony/security-guard to 3.4.48 or later; symfony/security-guard to 4.4.23 or later; symfony/security-guard to 5.2.8 or later; symfony/security-core to 3.4.48 or later; symfony/security-core to 4.4.23 or later; symfony/security-core to 5.2.8 or later; lexik/jwt-authentication-bundle to 2.10.7 or later; lexik/jwt-authentication-bundle to 2.11.3 or later; symfony/maker-bundle to 1.29.2 or later; symfony/maker-bundle to 1.31.1 or later; symfony/security-http to 5.2.8 or later; symfony/security to 3.4.49 or later; symfony/security to 4.4.24 or later; symfony/symfony to 3.4.49 or later; symfony/symfony to 4.4.24 or later; symfony/symfony to 5.2.9 or later

Kodem Kai can prioritize this vulnerability in your dependency tree and generate a fix recommendation.

Frequently Asked Questions

  1. What is CVE-2021-21424? CVE-2021-21424 is a medium-severity security vulnerability in symfony/security (composer), affecting versions >= 5.0.0, < 5.2.8. It is fixed in 5.2.8, 3.4.48, 4.4.23, 2.10.7, 2.11.3, 1.29.2, 1.31.1, 3.4.49, 4.4.24, 5.2.9.
  2. How severe is CVE-2021-21424? CVE-2021-21424 has a CVSS score of 5.3 (Medium). This score reflects the worst-case severity of the vulnerability, not your specific exposure. Whether it represents real risk in your environment depends on whether the vulnerable code is present and reachable.
  3. Which packages are affected by CVE-2021-21424?
    • symfony/security (composer) (versions >= 5.0.0, < 5.2.8)
    • symfony/security-guard (composer) (versions >= 2.8.0, < 3.4.48)
    • symfony/security-core (composer) (versions >= 2.8.0, < 3.4.48)
    • lexik/jwt-authentication-bundle (composer) (versions >= 2.0.0, < 2.10.7)
    • symfony/maker-bundle (composer) (versions >= 1.27.0, < 1.29.2)
    • symfony/security-http (composer) (versions >= 5.1.0, < 5.2.8)
    • symfony/symfony (composer) (versions >= 2.8.0, < 3.4.49)
  4. Is there a fix for CVE-2021-21424? Yes. CVE-2021-21424 is fixed in 5.2.8, 3.4.48, 4.4.23, 2.10.7, 2.11.3, 1.29.2, 1.31.1, 3.4.49, 4.4.24, 5.2.9. Upgrade to this version or later.
  5. Is CVE-2021-21424 exploitable, and should I be worried? Whether CVE-2021-21424 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  6. What actually determines whether CVE-2021-21424 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  7. How do I fix CVE-2021-21424?
    • Upgrade symfony/security to 5.2.8 or later
    • Upgrade symfony/security-guard to 3.4.48 or later
    • Upgrade symfony/security-guard to 4.4.23 or later
    • Upgrade symfony/security-guard to 5.2.8 or later
    • Upgrade symfony/security-core to 3.4.48 or later
    • Upgrade symfony/security-core to 4.4.23 or later
    • Upgrade symfony/security-core to 5.2.8 or later
    • Upgrade lexik/jwt-authentication-bundle to 2.10.7 or later
    • Upgrade lexik/jwt-authentication-bundle to 2.11.3 or later
    • Upgrade symfony/maker-bundle to 1.29.2 or later
    • Upgrade symfony/maker-bundle to 1.31.1 or later
    • Upgrade symfony/security-http to 5.2.8 or later
    • Upgrade symfony/security to 3.4.49 or later
    • Upgrade symfony/security to 4.4.24 or later
    • Upgrade symfony/symfony to 3.4.49 or later
    • Upgrade symfony/symfony to 4.4.24 or later
    • Upgrade symfony/symfony to 5.2.9 or later

Other vulnerabilities in symfony/security

Stop the waste.
Protect your environment with Kodem.