CVE-2020-5275: Symfony/security http Firewall Configured With Unanimous Strategy Vulnerability

HIGH
Advisory Identifier: GHSA-g4m9-5hpf-hx72
CVSS 7.6
CWE-285
Published
Advisory Summary

CVE-2020-5275 is a HIGH (CVSS 7.6) firewall configured with unanimous strategy vulnerability (CWE-285: Improper Authorization) affecting Symfony/security http libraries in the Packagist ecosystem. The issue involves firewall configured with unanimous strategy was not actually unanimous in symfony. Remediation is available by upgrading affected packages to version 5.0.7, 4.4.7.

CVE-2020-5275 at a Glance

CVE Identifier CVE-2020-5275
GHSA Identifier GHSA-g4m9-5hpf-hx72
Severity HIGH
CVSS v3.1 Base Score 7.6
CWE Classification CWE-285: Improper Authorization
Affected Product Symfony/security http
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 7.6

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction Required (UI:R)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2020-5275

To remediate this vulnerability, upgrade all affected Symfony/security http dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

symfony/security-http fixed: 5.0.7
Upgrade symfony/security-http to 5.0.7
symfony/security fixed: 4.4.7
Upgrade symfony/security to 4.4.7
symfony/security fixed: 5.0.7
Upgrade symfony/security to 5.0.7
symfony/security-http fixed: 4.4.7
Upgrade symfony/security-http to 4.4.7
symfony/symfony fixed: 4.4.7
Upgrade symfony/symfony to 4.4.7
symfony/symfony fixed: 5.0.7
Upgrade symfony/symfony to 5.0.7
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for symfony/security-http

How to Check if You Are Affected

To determine whether your application is affected by CVE-2020-5275, inspect your project dependencies for Symfony/security http:

inspect dependencies for symfony/security-http

Analyze the terminal output to locate any version of Symfony/security http in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 5.0.7), 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-285: Improper Authorization, where the product does not perform or incorrectly performs an authorization check when an actor attempts to access a resource or perform an action. In Symfony/security http, 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

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](https://github.com/symfony/symfony/commit/c935e4a3fba6cc2ab463a6ca382858068d63cebf) for the 4.4 branch. Credits ------- I would like to thank Antonio J. García Lagar for reporting & Robin Chalas for fixing the issue.

CVE-2020-5275 Affected Symfony/security http Versions

6 component(s)
Fixed Versions:
5.0.74.4.7
Product / Package Ecosystem Affected Versions Fixed Version
symfony/security-http
Packagist
≥ 5.0.0
< 5.0.7
5.0.7
symfony/security
Packagist
≥ 4.4.0
< 4.4.7
4.4.7
symfony/security
Packagist
≥ 5.0.0
< 5.0.7
5.0.7
symfony/security-http
Packagist
≥ 4.4.0
< 4.4.7
4.4.7
symfony/symfony
Packagist
≥ 4.4.0
< 4.4.7
4.4.7
symfony/symfony
Packagist
≥ 5.0.0
< 5.0.7
5.0.7

References

Frequently Asked Questions

What is CVE-2020-5275?
CVE-2020-5275 is a security vulnerability in Symfony/security http involving Firewall configured with unanimous strategy was not actually unanimous in Symfony under CWE-285: Improper Authorization.
Which Symfony/security http versions are affected?
Affected versions include releases prior to 5.0.7, 4.4.7 across affected packages: symfony/security-http, symfony/security, symfony/symfony.
What version fixes CVE-2020-5275?
Upgrading to 5.0.7, 4.4.7 (or the latest patched release for your respective branch) resolves the vulnerability.
Is symfony/security-http affected?
Yes, symfony/security-http is affected in releases prior to 5.0.7, 4.4.7. Upgrade your dependency to 5.0.7, 4.4.7 or later.
Is symfony/security affected?
Yes, symfony/security is affected in releases prior to 4.4.7, 5.0.7. Upgrade your dependency to 4.4.7, 5.0.7 or later.
What is the CVSS score of CVE-2020-5275?
CVE-2020-5275 has a CVSS v3.1 base score of 7.6 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:L/A:N.
What CWE is associated with CVE-2020-5275?
CVE-2020-5275 is classified under 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 can I check Packagist dependencies for CVE-2020-5275?
Run the dependency tree command: 'inspect dependencies for symfony/security-http'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-g4m9-5hpf-hx72",
  "modified" : "2024-02-05T11:13:15Z",
  "published" : "2020-03-30T20:09:44Z",
  "aliases" : [ "CVE-2020-5275" ],
  "summary" : "Firewall configured with unanimous strategy was not actually unanimous in Symfony",
  "details" : "Description\n-----------\n\nOn 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.\n\nAs 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.\n\nResolution\n----------\n\nThe `accessDecisionManager` is now called with all attributes at once, allowing the unanimous strategy being applied on each attribute. \n\nThe patch for this issue is available [here](https://github.com/symfony/symfony/commit/c935e4a3fba6cc2ab463a6ca382858068d63cebf) for the 4.4 branch.\n\nCredits\n-------\n\nI would like to thank Antonio J. García Lagar for reporting & Robin Chalas for fixing the issue.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "symfony/security"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.4.0"
      }, {
        "fixed" : "4.4.7"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "symfony/security"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.0.0"
      }, {
        "fixed" : "5.0.7"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "symfony/security-http"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.4.0"
      }, {
        "fixed" : "4.4.7"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "symfony/security-http"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.0.0"
      }, {
        "fixed" : "5.0.7"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "symfony/symfony"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "4.4.0"
      }, {
        "fixed" : "4.4.7"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "symfony/symfony"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "5.0.0"
      }, {
        "fixed" : "5.0.7"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/symfony/symfony/security/advisories/GHSA-g4m9-5hpf-hx72"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-5275"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/symfony/symfony/commit/c935e4a3fba6cc2ab463a6ca382858068d63cebf"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/security-http/CVE-2020-5275.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/security/CVE-2020-5275.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/symfony/symfony/CVE-2020-5275.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/C36JLPHUPKDFAX6D5WYFC4ALO2K7RDUQ"
  }, {
    "type" : "WEB",
    "url" : "https://symfony.com/cve-2020-5275"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-285" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-03-30T19:45:26Z",
    "nvd_published_at" : null
  }
}