CVE-2021-21424: Symfony/security Prevent User Enumeration Using Guard Vulnerability
MODERATECVE-2021-21424 is a MODERATE (CVSS 5.3) prevent user enumeration using guard vulnerability (CWE-203: Observable Discrepancy) affecting Symfony/security libraries in the Packagist ecosystem. The issue involves prevent user enumeration using guard or the new authenticator-based security. Remediation is available by upgrading affected packages to version 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.
CVE-2021-21424 at a Glance
Security Impact
CVSS: 5.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N).
How to Fix CVE-2021-21424
To remediate this vulnerability, upgrade all affected Symfony/security dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade symfony/security to 5.2.8
Upgrade symfony/security-guard to 3.4.48
Upgrade symfony/security-guard to 4.4.23
Upgrade symfony/security-guard to 5.2.8
Upgrade symfony/security-core to 3.4.48
Upgrade symfony/security-core to 4.4.23
Upgrade symfony/security-core to 5.2.8
Upgrade lexik/jwt-authentication-bundle to 2.10.7
Upgrade lexik/jwt-authentication-bundle to 2.11.3
Upgrade symfony/maker-bundle to 1.29.2
Upgrade symfony/maker-bundle to 1.31.1
Upgrade symfony/security-http to 5.2.8
Upgrade symfony/security to 3.4.49
Upgrade symfony/security to 4.4.24
Upgrade symfony/symfony to 3.4.49
Upgrade symfony/symfony to 4.4.24
Upgrade symfony/symfony to 5.2.9
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for symfony/security
How to Check if You Are Affected
To determine whether your application is affected by CVE-2021-21424, inspect your project dependencies for Symfony/security:
inspect dependencies for symfony/security
Analyze the terminal output to locate any version of Symfony/security in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.2.8), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-203: Observable Discrepancy, where the product behaves differently or sends different responses under different circumstances in a way that is observable to an unauthorized actor. In Symfony/security, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2021-21424 Affected Symfony/security Versions
17 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
symfony/security
|
Packagist |
≥ 5.0.0
< 5.2.8
|
5.2.8
|
|
symfony/security-guard
|
Packagist |
≥ 2.8.0
< 3.4.48
|
3.4.48
|
|
symfony/security-guard
|
Packagist |
≥ 4.0.0
< 4.4.23
|
4.4.23
|
|
symfony/security-guard
|
Packagist |
≥ 5.0.0
< 5.2.8
|
5.2.8
|
|
symfony/security-core
|
Packagist |
≥ 2.8.0
< 3.4.48
|
3.4.48
|
|
symfony/security-core
|
Packagist |
≥ 4.0.0
< 4.4.23
|
4.4.23
|
|
symfony/security-core
|
Packagist |
≥ 5.0.0
< 5.2.8
|
5.2.8
|
|
lexik/jwt-authentication-bundle
|
Packagist |
≥ 2.0.0
< 2.10.7
|
2.10.7
|
|
lexik/jwt-authentication-bundle
|
Packagist |
≥ 2.11.0
< 2.11.3
|
2.11.3
|
|
symfony/maker-bundle
|
Packagist |
≥ 1.27.0
< 1.29.2
|
1.29.2
|
|
symfony/maker-bundle
|
Packagist |
≥ 1.30.0
< 1.31.1
|
1.31.1
|
|
symfony/security-http
|
Packagist |
≥ 5.1.0
< 5.2.8
|
5.2.8
|
|
symfony/security
|
Packagist |
≥ 2.8.0
< 3.4.49
|
3.4.49
|
|
symfony/security
|
Packagist |
≥ 4.0.0
< 4.4.24
|
4.4.24
|
|
symfony/symfony
|
Packagist |
≥ 2.8.0
< 3.4.49
|
3.4.49
|
|
symfony/symfony
|
Packagist |
≥ 4.0.0
< 4.4.24
|
4.4.24
|
|
symfony/symfony
|
Packagist |
≥ 5.0.0
< 5.2.9
|
5.2.9
|
References
Frequently Asked Questions
What is CVE-2021-21424?
Which Symfony/security versions are affected?
What version fixes CVE-2021-21424?
Is symfony/security affected?
Is symfony/security-guard affected?
What is the CVSS score of CVE-2021-21424?
What CWE is associated with CVE-2021-21424?
How can I check Packagist dependencies for CVE-2021-21424?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-5pv8-ppvj-4h68",
"modified" : "2024-02-26T12:39:59Z",
"published" : "2021-05-13T20:23:02Z",
"aliases" : [ "CVE-2021-21424" ],
"summary" : "Prevent user enumeration using Guard or the new Authenticator-based Security",
"details" : "Description\n-----------\n\nThe 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.\n\nResolution\n----------\n\nWe now ensure that 403s are returned whether the user exists or not if the password is invalid or if the user does not exist.\n\nThe patch for this issue is available [here](https://github.com/symfony/symfony/commit/2a581d22cc621b33d5464ed65c4bc2057f72f011) for branch 3.4.\n\nCredits\n-------\n\nI would like to thank James Isaac and Mathias Brodala for reporting the issue and Robin Chalas for fixing the issue.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/security"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "5.0.0"
}, {
"fixed" : "5.2.8"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/security-guard"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.8.0"
}, {
"fixed" : "3.4.48"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/security-guard"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "4.0.0"
}, {
"fixed" : "4.4.23"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/security-guard"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "5.0.0"
}, {
"fixed" : "5.2.8"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/security-core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.8.0"
}, {
"fixed" : "3.4.48"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/security-core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "4.0.0"
}, {
"fixed" : "4.4.23"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/security-core"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "5.0.0"
}, {
"fixed" : "5.2.8"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "lexik/jwt-authentication-bundle"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.0.0"
}, {
"fixed" : "2.10.7"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "lexik/jwt-authentication-bundle"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.11.0"
}, {
"fixed" : "2.11.3"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/maker-bundle"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.27.0"
}, {
"fixed" : "1.29.2"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/maker-bundle"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.30.0"
}, {
"fixed" : "1.31.1"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/security-http"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "5.1.0"
}, {
"fixed" : "5.2.8"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/security"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.8.0"
}, {
"fixed" : "3.4.49"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/security"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "4.0.0"
}, {
"fixed" : "4.4.24"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/symfony"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "2.8.0"
}, {
"fixed" : "3.4.49"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/symfony"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "4.0.0"
}, {
"fixed" : "4.4.24"
} ]
} ]
}, {
"package" : {
"ecosystem" : "Packagist",
"name" : "symfony/symfony"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "5.0.0"
}, {
"fixed" : "5.2.9"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/symfony/symfony/security/advisories/GHSA-5pv8-ppvj-4h68"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2021-21424"
}, {
"type" : "WEB",
"url" : "https://github.com/symfony/symfony/commit/2a581d22cc621b33d5464ed65c4bc2057f72f011"
}, {
"type" : "WEB",
"url" : "https://symfony.com/cve-2021-21424"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/VRUS2H2SSOQWNLBD35SKIWIDQEMV2PD3"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/UC7BND775DVZDQT3RMGD2HVB2PKLJDJW"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/RH7TMM5CHQYBFFGXWRPJDPB3SKCZXI2M"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/KENRNLB3FYXYGDWRBH2PDBOZZKOD7VY4"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/VRUS2H2SSOQWNLBD35SKIWIDQEMV2PD3"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/UC7BND775DVZDQT3RMGD2HVB2PKLJDJW"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/RH7TMM5CHQYBFFGXWRPJDPB3SKCZXI2M"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/KENRNLB3FYXYGDWRBH2PDBOZZKOD7VY4"
}, {
"type" : "WEB",
"url" : "https://lists.debian.org/debian-lts-announce/2023/07/msg00014.html"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/symfony/symfony"
}, {
"type" : "WEB",
"url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/symfony/CVE-2021-21424.yaml"
}, {
"type" : "WEB",
"url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/security/CVE-2021-21424.yaml"
}, {
"type" : "WEB",
"url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/security-http/CVE-2021-21424.yaml"
}, {
"type" : "WEB",
"url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/security-guard/CVE-2021-21424.yaml"
}, {
"type" : "WEB",
"url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/maker-bundle/CVE-2021-21424.yaml"
}, {
"type" : "WEB",
"url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/lexik/jwt-authentication-bundle/CVE-2021-21424.yaml"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-200", "CWE-203" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2021-05-13T15:25:38Z",
"nvd_published_at" : "2021-05-13T16:15:00Z"
}
}