CVE-2022-24733: Sylius/sylius Improper Restriction Of Rendered UI Vulnerability

MODERATE
Advisory Identifier: GHSA-4jp3-q2qm-9fmw
CVSS 6.1
CWE-1021
Published
Advisory Summary

CVE-2022-24733 is a MODERATE (CVSS 6.1) improper restriction of rendered ui vulnerability (CWE-1021: Improper Restriction of Rendered UI Layers or Frames) affecting Sylius/sylius libraries in the Packagist ecosystem. The issue involves improper restriction of rendered ui layers or frames in sylius. Remediation is available by upgrading affected packages to version 1.9.10, 1.10.11, 1.11.2.

CVE-2022-24733 at a Glance

CVE Identifier CVE-2022-24733
GHSA Identifier GHSA-4jp3-q2qm-9fmw
Severity MODERATE
CVSS v3.1 Base Score 6.1
CWE Classification CWE-1021: Improper Restriction of Rendered UI Layers or Frames
Affected Product Sylius/sylius
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 6.1

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

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
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-2022-24733

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.9.10
Upgrade sylius/sylius to 1.9.10
sylius/sylius fixed: 1.10.11
Upgrade sylius/sylius to 1.10.11
sylius/sylius fixed: 1.11.2
Upgrade sylius/sylius to 1.11.2
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-2022-24733, 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.9.10), 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-1021: Improper Restriction of Rendered UI Layers or Frames, where the web application does not restrict or incorrectly restricts frame objects or ui layers that belong to another application or domain. 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 It is possible for a page controlled by an attacker to load the website within an iframe. This will enable a clickjacking attack, in which the attacker's page overlays the target application's interface with a different interface provided by the attacker ### Patches The issue is fixed in versions: 1.9.10, 1.10.11, 1.11.2, and above. ### Workarounds Every response from app should have an X-Frame-Options header set to: ``sameorigin``. To achieve that you just need to add a new **subscriber** in your app. ```php <?php // src/EventListener/XFrameOptionsSubscriber.php namespace App\EventListener final class XFrameOptionsSubscriber implements EventSubscriberInterface { public static function getSubscribedEvents(): array { return [ KernelEvents::RESPONSE => 'onKernelResponse', ]; } public function onKernelResponse(ResponseEvent $event): void { if (!$this->isMainRequest($event)) { return; } $response = $event->getResponse(); $response->headers->set('X-Frame-Options', 'sameorigin'); } private function isMainRequest(ResponseEvent $event): bool { if (\method_exists($event, 'isMainRequest')) { return $event->isMainRequest(); } return $event->isMasterRequest(); } } ``` And register it in the container: ```yaml # config/services.yaml services: # ... App\EventListener\XFrameOptionsSubscriber: tags: ['kernel.event_subscriber'] ``` ### For more information If you have any questions or comments about this advisory: * Open an issue in [Sylius issues](https://github.com/Sylius/Sylius/issues) * Email us at [security@sylius.com](mailto:security@sylius.com)

CVE-2022-24733 Affected Sylius/sylius Versions

3 component(s)
Fixed Versions:
1.9.101.10.111.11.2
Product / Package Ecosystem Affected Versions Fixed Version
sylius/sylius
Packagist
< 1.9.10
1.9.10
sylius/sylius
Packagist
≥ 1.10.0
< 1.10.11
1.10.11
sylius/sylius
Packagist
≥ 1.11.0
< 1.11.2
1.11.2

References

Frequently Asked Questions

What is CVE-2022-24733?
CVE-2022-24733 is a security vulnerability in Sylius/sylius involving Improper Restriction of Rendered UI Layers or Frames in Sylius under CWE-1021: Improper Restriction of Rendered UI Layers or Frames.
Which Sylius/sylius versions are affected?
Affected versions include releases prior to 1.9.10, 1.10.11, 1.11.2 across affected packages: sylius/sylius.
What version fixes CVE-2022-24733?
Upgrading to 1.9.10, 1.10.11, 1.11.2 (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.9.10, 1.10.11, 1.11.2. Upgrade your dependency to 1.9.10, 1.10.11, 1.11.2 or later.
What is the CVSS score of CVE-2022-24733?
CVE-2022-24733 has a CVSS v3.1 base score of 6.1 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N.
What CWE is associated with CVE-2022-24733?
CVE-2022-24733 is classified under CWE-1021: Improper Restriction of Rendered UI Layers or Frames (The web application does not restrict or incorrectly restricts frame objects or UI layers that belong to another application or domain.).
How can I check Packagist dependencies for CVE-2022-24733?
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-4jp3-q2qm-9fmw",
  "modified" : "2022-03-28T22:31:17Z",
  "published" : "2022-03-14T21:55:33Z",
  "aliases" : [ "CVE-2022-24733" ],
  "summary" : "Improper Restriction of Rendered UI Layers or Frames in Sylius",
  "details" : "### Impact\n\nIt is possible for a page controlled by an attacker to load the website within an iframe. This will enable a clickjacking attack, in which the attacker's page overlays the target application's interface with a different interface provided by the attacker\n\n### Patches\n\nThe issue is fixed in versions: 1.9.10, 1.10.11, 1.11.2, and above.\n\n### Workarounds\n\nEvery response from app should have an X-Frame-Options header set to: ``sameorigin``. To achieve that you just need to add a new **subscriber** in your app. \n\n```php\n<?php\n\n// src/EventListener/XFrameOptionsSubscriber.php\n\nnamespace App\\EventListener\n\nfinal class XFrameOptionsSubscriber implements EventSubscriberInterface\n{\n    public static function getSubscribedEvents(): array\n    {\n        return [\n            KernelEvents::RESPONSE => 'onKernelResponse',\n        ];\n    }\n\n    public function onKernelResponse(ResponseEvent $event): void\n    {\n        if (!$this->isMainRequest($event)) {\n            return;\n        }\n\n        $response = $event->getResponse();\n\n        $response->headers->set('X-Frame-Options', 'sameorigin');\n    }\n\n    private function isMainRequest(ResponseEvent $event): bool\n    {\n        if (\\method_exists($event, 'isMainRequest')) {\n            return $event->isMainRequest();\n        }\n\n        return $event->isMasterRequest();\n    }\n}\n\n```\n\nAnd register it in the container:\n\n```yaml\n# config/services.yaml\nservices:\n    # ...\n    App\\EventListener\\XFrameOptionsSubscriber:\n        tags: ['kernel.event_subscriber']\n```\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [Sylius issues](https://github.com/Sylius/Sylius/issues)\n* Email us at [security@sylius.com](mailto:security@sylius.com)\n",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/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.9.10"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "sylius/sylius"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.10.0"
      }, {
        "fixed" : "1.10.11"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "sylius/sylius"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.11.0"
      }, {
        "fixed" : "1.11.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/Sylius/Sylius/security/advisories/GHSA-4jp3-q2qm-9fmw"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2022-24733"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/Sylius/Sylius"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Sylius/Sylius/releases/tag/v1.10.11"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Sylius/Sylius/releases/tag/v1.11.2"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Sylius/Sylius/releases/tag/v1.9.10"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-1021" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-03-14T21:55:33Z",
    "nvd_published_at" : "2022-03-14T19:15:00Z"
  }
}