{"id":"CVE-2022-24733","aliases":["GHSA-4jp3-q2qm-9fmw"],"url":"https://o3.security/vulnerability/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","published":"2022-03-14T18:50:10Z","modified":"2026-08-12T03:51:43.956870228Z","cvss":{"score":6.1,"severity":"MEDIUM","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"},"epss":{"score":0.00907,"percentile":0.58121,"asOf":"2026-09-16"},"cisaKev":null,"exploitsKnown":0,"affectedPackages":[{"ecosystem":"Packagist","name":"sylius/sylius","fixedVersion":"1.9.10"},{"ecosystem":"Packagist","name":"sylius/sylius","fixedVersion":"1.10.11"},{"ecosystem":"Packagist","name":"sylius/sylius","fixedVersion":"1.11.2"}],"fix":null,"references":[{"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"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/24xxx/CVE-2022-24733.json"},{"type":"ADVISORY","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"}],"provenance":{"sources":["OSV.dev","FIRST.org (EPSS)"],"lastVerified":"2026-08-12T03:51:43.956870228Z"}}