CVE-2020-5220: Sylius/resource bundle Ability To Expose Data Vulnerability

MODERATE
Advisory Identifier: GHSA-8vp7-j5cj-vvm2
CVSS 4.4
CWE-444 CWE-200
Published
Advisory Summary

CVE-2020-5220 is a MODERATE (CVSS 4.4) ability to expose data vulnerability (CWE-444: Inconsistent Interpretation of HTTP Requests ('HTTP Request/Response Smuggling')) affecting Sylius/resource bundle libraries in the Packagist ecosystem. The issue involves ability to expose data in sylius by using an unintended serialisation group. Remediation is available by upgrading affected packages to version 1.4.6, 1.5.1, 1.6.3, 1.3.12, 1.4.4, 1.3.13.

CVE-2020-5220 at a Glance

CVE Identifier CVE-2020-5220
GHSA Identifier GHSA-8vp7-j5cj-vvm2
Severity MODERATE
CVSS v3.1 Base Score 4.4
CWE Classification CWE-444: Inconsistent Interpretation of HTTP Requests ('HTTP Request/Response Smuggling')
Affected Product Sylius/resource bundle
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 4.4

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

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

How to Fix CVE-2020-5220

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

sylius/resource-bundle fixed: 1.4.6
Upgrade sylius/resource-bundle to 1.4.6
sylius/resource-bundle fixed: 1.5.1
Upgrade sylius/resource-bundle to 1.5.1
sylius/resource-bundle fixed: 1.6.3
Upgrade sylius/resource-bundle to 1.6.3
sylius/sylius fixed: 1.3.12
Upgrade sylius/sylius to 1.3.12
sylius/sylius fixed: 1.4.4
Upgrade sylius/sylius to 1.4.4
sylius/resource-bundle fixed: 1.3.13
Upgrade sylius/resource-bundle to 1.3.13
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 sylius/resource-bundle

How to Check if You Are Affected

To determine whether your application is affected by CVE-2020-5220, inspect your project dependencies for Sylius/resource bundle:

inspect dependencies for sylius/resource-bundle

Analyze the terminal output to locate any version of Sylius/resource bundle in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.4.6), 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-444: Inconsistent Interpretation of HTTP Requests ('HTTP Request/Response Smuggling'), where the product acts as an intermediary http agent (such as a proxy or firewall) in the data flow between two entities such as a client and server, but it does not interpret malformed http requests or responses in ways that are consistent with how the messages will be processed by those entities that are at the ultimate destination. In Sylius/resource bundle, 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

### Impact ResourceBundle accepts and uses any serialisation groups to be passed via a HTTP header. This might lead to data exposure by using an unintended serialisation group - for example it could make Shop API use a more permissive group from Admin API. Anyone exposing an API with ResourceBundle's controller is affected. The vulnerable versions are: `<1.3 || >=1.3.0 <=1.3.12 || >=1.4.0 <=1.4.5 || >=1.5.0 <=1.5.0 || >=1.6.0 <=1.6.2`. ### Patches The patch is provided for ResourceBundle 1.3.13, 1.4.6, 1.5.1 and 1.6.3, but not for any versions below 1.3. After it is applied, It allows to choose only the groups that are defined in `serialization_groups` or `allowed_serialization_groups` route definition. Any group not defined in those will not be used. This behaviour might be a BC break for those using custom groups via the HTTP header, please adjust `allowed_serialization_groups` accordingly. ### Workarounds Service `sylius.resource_controller.request_configuration_factory` can be overridden with an implementation copied from `\Sylius\Bundle\ResourceBundle\Controller\RequestConfigurationFactory` where the part that handles custom serialisation groups is deleted.

CVE-2020-5220 Affected Sylius/resource bundle Versions

6 component(s)
Fixed Versions:
1.4.61.5.11.6.31.3.121.4.41.3.13
Product / Package Ecosystem Affected Versions Fixed Version
sylius/resource-bundle
Packagist
≥ 1.4.0
< 1.4.6
1.4.6
sylius/resource-bundle
Packagist
≥ 1.5.0
< 1.5.1
1.5.1
sylius/resource-bundle
Packagist
≥ 1.6.0
< 1.6.3
1.6.3
sylius/sylius
Packagist
< 1.3.12
1.3.12
sylius/sylius
Packagist
≥ 1.4.0
< 1.4.4
1.4.4
sylius/resource-bundle
Packagist
≥ 1.0.0
< 1.3.13
1.3.13

References

Frequently Asked Questions

What is CVE-2020-5220?
CVE-2020-5220 is a security vulnerability in Sylius/resource bundle involving Ability to expose data in Sylius by using an unintended serialisation group under CWE-444: Inconsistent Interpretation of HTTP Requests ('HTTP Request/Response Smuggling').
Which Sylius/resource bundle versions are affected?
Affected versions include releases prior to 1.4.6, 1.5.1, 1.6.3, 1.3.12, 1.4.4, 1.3.13 across affected packages: sylius/resource-bundle, sylius/sylius.
What version fixes CVE-2020-5220?
Upgrading to 1.4.6, 1.5.1, 1.6.3, 1.3.12, 1.4.4, 1.3.13 (or the latest patched release for your respective branch) resolves the vulnerability.
Is sylius/resource-bundle affected?
Yes, sylius/resource-bundle is affected in releases prior to 1.4.6, 1.5.1, 1.6.3, 1.3.13. Upgrade your dependency to 1.4.6, 1.5.1, 1.6.3, 1.3.13 or later.
Is sylius/sylius affected?
Yes, sylius/sylius is affected in releases prior to 1.3.12, 1.4.4. Upgrade your dependency to 1.3.12, 1.4.4 or later.
What is the CVSS score of CVE-2020-5220?
CVE-2020-5220 has a CVSS v3.1 base score of 4.4 (MODERATE) with vector string CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:N.
What CWE is associated with CVE-2020-5220?
CVE-2020-5220 is classified under CWE-444: Inconsistent Interpretation of HTTP Requests ('HTTP Request/Response Smuggling') (The product acts as an intermediary HTTP agent (such as a proxy or firewall) in the data flow between two entities such as a client and server, but it does not interpret malformed HTTP requests or responses in ways that are consistent with how the messages will be processed by those entities that are at the ultimate destination.).
How can I check Packagist dependencies for CVE-2020-5220?
Run the dependency tree command: 'inspect dependencies for sylius/resource-bundle'. 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-8vp7-j5cj-vvm2",
  "modified" : "2024-02-07T18:42:55Z",
  "published" : "2020-01-31T18:00:43Z",
  "aliases" : [ "CVE-2020-5220" ],
  "summary" : "Ability to expose data in Sylius by using an unintended serialisation group",
  "details" : "### Impact\n\nResourceBundle accepts and uses any serialisation groups to be passed via a HTTP header. This might lead to data exposure by using an unintended serialisation group - for example it could make Shop API use a more permissive group from Admin API.\n\nAnyone exposing an API with ResourceBundle's controller is affected. The vulnerable versions are: `<1.3 || >=1.3.0 <=1.3.12 || >=1.4.0 <=1.4.5 || >=1.5.0 <=1.5.0 || >=1.6.0 <=1.6.2`.\n\n### Patches\n\nThe patch is provided for ResourceBundle 1.3.13, 1.4.6, 1.5.1 and 1.6.3, but not for any versions below 1.3.\n\nAfter it is applied, It allows to choose only the groups that are defined in `serialization_groups` or `allowed_serialization_groups` route definition. Any group not defined in those will not be used.\n\nThis behaviour might be a BC break for those using custom groups via the HTTP header, please adjust `allowed_serialization_groups` accordingly.\n\n### Workarounds\n\nService `sylius.resource_controller.request_configuration_factory` can be overridden with an implementation copied from `\\Sylius\\Bundle\\ResourceBundle\\Controller\\RequestConfigurationFactory` where the part that handles custom serialisation groups is deleted.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:L/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "sylius/resource-bundle"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.4.0"
      }, {
        "fixed" : "1.4.6"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "sylius/resource-bundle"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.5.0"
      }, {
        "fixed" : "1.5.1"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "sylius/resource-bundle"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.6.0"
      }, {
        "fixed" : "1.6.3"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "sylius/sylius"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.3.12"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "sylius/sylius"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.4.0"
      }, {
        "fixed" : "1.4.4"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "sylius/resource-bundle"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.0.0"
      }, {
        "fixed" : "1.3.13"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/Sylius/SyliusResourceBundle/security/advisories/GHSA-8vp7-j5cj-vvm2"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2020-5220"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/sylius/resource-bundle/CVE-2020-5220.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/sylius/sylius/CVE-2020-5220.yaml"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-200", "CWE-444" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-01-27T20:11:32Z",
    "nvd_published_at" : "2020-01-27T21:15:11Z"
  }
}