Skip to content

GHSA-g4m9-5hpf-hx72 BIT-symfony-2020-5275 CVE-2020-5275

Firewall configured with unanimous strategy was not actually unanimous in Symfony

High Packagist
Severity
7.6 / 10
High · CVSS 3.1
Exploit chance (EPSS)
1.15%
Chance of exploitation in the next 30 days. Higher than 66.81% of scored vulnerabilities.
Known exploited
No
Not in CISA's catalog
Weakness
CWE-285 Improper Authorization
Fix
Available
3 packages have a fixed version

Description

Description

On Symfony before 4.4.0, when a Firewall checks an access control rule (using the unanimous strategy), it iterates over all rule attributes and grant access only if all calls to the accessDecisionManager decide to grant access.

As of Symfony 4.4.0, a bug was introduced that prevents the check of attributes as soon as accessDecisionManager decide to grant access on one attribute.

Resolution

The accessDecisionManager is now called with all attributes at once, allowing the unanimous strategy being applied on each attribute.

The patch for this issue is available here for the 4.4 branch.

Credits

I would like to thank Antonio J. García Lagar for reporting & Robin Chalas for fixing the issue.

Affected versions

Packagist

PackageVulnerableFixed in
symfony/security
>= 4.4.0, < 4.4.7
4.4.7
symfony/security
>= 5.0.0, < 5.0.7
5.0.7
symfony/security-http
>= 4.4.0, < 4.4.7
4.4.7
symfony/security-http
>= 5.0.0, < 5.0.7
5.0.7
symfony/symfony
>= 4.4.0, < 4.4.7
4.4.7
symfony/symfony
>= 5.0.0, < 5.0.7
5.0.7

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.

symfony/security Packagist → 4.4.7

composer
composer require symfony/security:^4.4.7

symfony/security-http Packagist → 4.4.7

composer
composer require symfony/security-http:^4.4.7

symfony/symfony Packagist → 4.4.7

composer
composer require symfony/symfony:^4.4.7

Severity breakdown

CVSS 3.1 7.6

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

Attack vector
Network
Attack complexity
Low
Privileges required
Low
User interaction
Required
Scope
Changed
Confidentiality
High
Integrity
Low
Availability
None

Weakness

CWE-285: Improper Authorization

The product does not perform or incorrectly performs an authorization check when an actor attempts to access a resource or perform an action.

How to prevent it
  • Architecture and Design: Divide the product into anonymous, normal, privileged, and administrative areas. Reduce the attack surface by carefully mapping roles with data and functionality. Use role-based access control (RBAC) to enforce the roles at the appropriate boundaries. Note that this approach may not protect against horizontal authorization, i.e., it will not protect a user from attacking others with the same role.
  • Architecture and Design: Ensure that you perform access control checks related to your business logic. These checks may be different than the access control checks that you apply to more generic resources such as files, connections, processes, memory, and database records. For example, a database may restrict access for medical records to a specific database user, but each record might only be intended to be accessible to the patient and the patient's doctor.
  • Architecture and Design: Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. For example, consider using authorization frameworks such as the JAAS Authorization Framework [REF-233] and the OWASP ESAPI Access Control feature [REF-45].
  • Architecture and Design: For web applications, make sure that the access control mechanism is enforced correctly at the server side on every page. Users should not be able to access any unauthorized functionality or information by simply requesting direct access to that page. One way to do this is to ensure that all pages containing sensitive information are not cached, and that all such pages restrict access to requests that are accompanied by an active and authenticated session token associated with a user who has the required permissions to access that page.
  • System Configuration, Installation: Use the access control capabilities of your operating system and server environment and define your access control lists accordingly. Use a "default deny" policy when defining these ACLs.

References

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