Skip to content

GHSA-5pv8-ppvj-4h68 BIT-symfony-2021-21424 CVE-2021-21424

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

Medium Packagist
Severity
5.3 / 10
Medium · CVSS 3.1
Exploit chance (EPSS)
1.64%
Chance of exploitation in the next 30 days. Higher than 76.44% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
CWE-200 Exposure of Sensitive Information to an Unauthorized Actor
CWE-203 Observable Discrepancy
Fix
Available
7 packages have a fixed version

Description

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.

Affected versions

Packagist

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

How to fix

Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.

lexik/jwt-authentication-bundle Packagist → 2.10.7

composer
composer require lexik/jwt-authentication-bundle:^2.10.7

symfony/maker-bundle Packagist → 1.29.2

composer
composer require symfony/maker-bundle:^1.29.2

symfony/security Packagist → 5.2.8

composer
composer require symfony/security:^5.2.8

symfony/security-core Packagist → 3.4.48

composer
composer require symfony/security-core:^3.4.48

symfony/security-guard Packagist → 3.4.48

composer
composer require symfony/security-guard:^3.4.48

symfony/security-http Packagist → 5.2.8

composer
composer require symfony/security-http:^5.2.8

symfony/symfony Packagist → 3.4.49

composer
composer require symfony/symfony:^3.4.49

Severity breakdown

CVSS 3.1 5.3

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

Attack vector
Network
Attack complexity
Low
Privileges required
None
User interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
None
Availability
None

Weakness

CWE-200: Exposure of Sensitive Information to an Unauthorized Actor

The product exposes sensitive information to an actor that is not explicitly authorized to have access to that information.

How to prevent it
  • Architecture and Design: Compartmentalize the system to have "safe" areas where trust boundaries can be unambiguously drawn. Do not allow sensitive data to go outside of the trust boundary and always be careful when interfacing with a compartment outside of the safe area. Ensure that appropriate compartmentalization is built into the system design, and the compartmentalization allows for and reinforces privilege separation functionality. Architects and designers should rely on the principle of least privilege to decide the appropriate time to use privileges and the time to drop privileges.

CWE-203: Observable Discrepancy

The product behaves differently or sends different responses under different circumstances in a way that is observable to an unauthorized actor.

How to prevent it
  • Architecture and Design: Compartmentalize the system to have "safe" areas where trust boundaries can be unambiguously drawn. Do not allow sensitive data to go outside of the trust boundary and always be careful when interfacing with a compartment outside of the safe area. Ensure that appropriate compartmentalization is built into the system design, and the compartmentalization allows for and reinforces privilege separation functionality. Architects and designers should rely on the principle of least privilege to decide the appropriate time to use privileges and the time to drop privileges.
  • Implementation: Ensure that error messages only contain minimal details that are useful to the intended audience and no one else. The messages need to strike the balance between being too cryptic (which can confuse users) or being too detailed (which may reveal more than intended). The messages should not reveal the methods that were used to determine the error. Attackers can use detailed information to refine or optimize their original attack, thereby increasing their chances of success. If errors must be captured in some detail, record them in log messages, but consider what could occur if the log messages can be viewed by attackers. Highly sensitive information such as passwords should never be saved to log files. Avoid inconsistent messaging that might accidentally tip off an attacker about internal state, such as whether a user account exists or not.

References

Advisories

Packages

Other links

Timeline

  1. Published
  2. Last updated by the source
  3. Latest EPSS score
AdvisorySeverityWhy it's related
GHSA-2v3c-qxhr-7vpv
Symfony: Unbounded Recursion in the YAML Inline Lexer Lets a Single Document Crash the Process
High Also affects symfony/symfony
GHSA-r925-mgvr-h9cc
Symfony: ReDoS in HeaderUtils::split() Reachable Through the Cache-Control Request Header
High Also affects symfony/symfony
GHSA-h5x3-xfc9-m39h
Symfony: UrlGenerator Dot-Segment Encoding Skips Every Other Chained `../` or `./` → Generated URL Collapses Off-Route Under RFC 3986 Normalization
Medium Also affects symfony/symfony
GHSA-v3wm-qf9p-c549
Symfony: HtmlSanitizer URL Parser Deny Gates Underinclusive: Percent-Encoded BiDi Marks and Unicode Whitespace Bypass Visual-Spoofing Defense
Medium Also affects symfony/symfony
GHSA-rrj9-5q2j-4gvr
Symfony: Mailomat Mailer Webhook Parser Reads the HMAC Algorithm from the Request: Signature Algorithm Downgrade
Medium Also affects symfony/symfony
GHSA-38cx-cq6f-5755
Symfony: IpUtils::PRIVATE_SUBNETS Omits IPv6 Transition Forms (6to4, NAT64, Teredo, IPv4-compatible): SSRF Bypass in NoPrivateNetworkHttpClient
High Also affects symfony/symfony
GHSA-6h46-9jf5-q59x
Symfony: Security Firewall Bypass via failure_forward Subrequest: Unauthenticated Access to access_control-Protected GET Routes
High Also affects symfony/security-http
GHSA-x5qj-865h-mgvm
Symfony: HtmlSanitizer UrlAttributeSanitizer Misses URL Attributes
Medium Also affects symfony/symfony
Is this in your code?

MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.

Check your repos with MergeHarbor