CVE-2020-5218: Sylius/sylius Ability To Switch Channels Vulnerability

LOW
Advisory Identifier: GHSA-prg5-hg25-8grq
CVSS 4.4
CWE-444
Published
Advisory Summary

CVE-2020-5218 is a LOW (CVSS 4.4) ability to switch channels vulnerability (CWE-444: Inconsistent Interpretation of HTTP Requests ('HTTP Request/Response Smuggling')) affecting Sylius/sylius libraries in the Packagist ecosystem. The issue involves ability to switch channels via get parameter enabled in production environments. Remediation is available by upgrading affected packages to version 1.3.16, 1.4.12, 1.5.9, 1.6.5.

CVE-2020-5218 at a Glance

CVE Identifier CVE-2020-5218
GHSA Identifier GHSA-prg5-hg25-8grq
Severity LOW
CVSS v3.1 Base Score 4.4
CWE Classification CWE-444: Inconsistent Interpretation of HTTP Requests ('HTTP Request/Response Smuggling')
Affected Product Sylius/sylius
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-5218

To remediate this vulnerability, upgrade all affected Sylius/sylius 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/sylius fixed: 1.3.16
Upgrade sylius/sylius to 1.3.16
sylius/sylius fixed: 1.4.12
Upgrade sylius/sylius to 1.4.12
sylius/sylius fixed: 1.5.9
Upgrade sylius/sylius to 1.5.9
sylius/sylius fixed: 1.6.5
Upgrade sylius/sylius to 1.6.5
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/sylius

How to Check if You Are Affected

To determine whether your application is affected by CVE-2020-5218, inspect your project dependencies for Sylius/sylius:

inspect dependencies for sylius/sylius

Analyze the terminal output to locate any version of Sylius/sylius in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.3.16), 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/sylius, 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 This vulnerability gives the ability to switch channels via the `_channel_code` GET parameter in production environments. This was meant to be enabled only when `%kernel.debug%` is set to true. However, if no `sylius_channel.debug` is set explicitly in the configuration, the default value which is `%kernel.debug%` will be not resolved and cast to boolean, enabling this debug feature even if that parameter is set to false. ### Patches Patch has been provided for Sylius 1.3.x and newer - **1.3.16, 1.4.12, 1.5.9, 1.6.5**. Versions older than 1.3 are not covered by our security support anymore. ### Workarounds Unsupported versions could be patched by adding the following configuration to run in production: ```yaml sylius_channel: debug: false ```

CVE-2020-5218 Affected Sylius/sylius Versions

4 component(s)
Fixed Versions:
1.3.161.4.121.5.91.6.5
Product / Package Ecosystem Affected Versions Fixed Version
sylius/sylius
Packagist
< 1.3.16
1.3.16
sylius/sylius
Packagist
≥ 1.4.0
< 1.4.12
1.4.12
sylius/sylius
Packagist
≥ 1.5
< 1.5.9
1.5.9
sylius/sylius
Packagist
≥ 1.6.0
< 1.6.5
1.6.5

References

Frequently Asked Questions

What is CVE-2020-5218?
CVE-2020-5218 is a security vulnerability in Sylius/sylius involving Ability to switch channels via GET parameter enabled in production environments under CWE-444: Inconsistent Interpretation of HTTP Requests ('HTTP Request/Response Smuggling').
Which Sylius/sylius versions are affected?
Affected versions include releases prior to 1.3.16, 1.4.12, 1.5.9, 1.6.5 across affected packages: sylius/sylius.
What version fixes CVE-2020-5218?
Upgrading to 1.3.16, 1.4.12, 1.5.9, 1.6.5 (or the latest patched release for your respective branch) resolves the vulnerability.
Is sylius/sylius affected?
Yes, sylius/sylius is affected in releases prior to 1.3.16, 1.4.12, 1.5.9, 1.6.5. Upgrade your dependency to 1.3.16, 1.4.12, 1.5.9, 1.6.5 or later.
What is the CVSS score of CVE-2020-5218?
CVE-2020-5218 has a CVSS v3.1 base score of 4.4 (LOW) 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-5218?
CVE-2020-5218 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-5218?
Run the dependency tree command: 'inspect dependencies for sylius/sylius'. 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-prg5-hg25-8grq",
  "modified" : "2021-01-08T20:32:23Z",
  "published" : "2020-01-31T18:00:58Z",
  "aliases" : [ "CVE-2020-5218" ],
  "summary" : "Ability to switch channels via GET parameter enabled in production environments",
  "details" : "### Impact\n\nThis vulnerability gives the ability to switch channels via the `_channel_code` GET parameter in production environments. This was meant to be enabled only when `%kernel.debug%` is set to true. \n\nHowever, if no `sylius_channel.debug` is set explicitly in the configuration, the default value which is `%kernel.debug%` will be not resolved and cast to boolean, enabling this debug feature even if that parameter is set to false.\n\n### Patches\n\nPatch has been provided for Sylius 1.3.x and newer - **1.3.16, 1.4.12, 1.5.9, 1.6.5**. Versions older than 1.3 are not covered by our security support anymore.\n\n### Workarounds\n\nUnsupported versions could be patched by adding the following configuration to run in production:\n\n```yaml\nsylius_channel:\n    debug: false\n```",
  "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/sylius"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.3.16"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "sylius/sylius"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.4.0"
      }, {
        "fixed" : "1.4.12"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "sylius/sylius"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.5"
      }, {
        "fixed" : "1.5.9"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "sylius/sylius"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.6.0"
      }, {
        "fixed" : "1.6.5"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/Sylius/Sylius/security/advisories/GHSA-prg5-hg25-8grq"
  }, {
    "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-5218"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/FriendsOfPHP/security-advisories/blob/master/sylius/resource-bundle/CVE-2020-5220.yaml"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-444" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2020-01-27T20:21:16Z",
    "nvd_published_at" : null
  }
}