Improper Restriction of Rendered UI Layers or Frames in Sylius
Published 14 Mar 2022 · Updated 8 Nov 2023
Is your project on an affected sylius/sylius?
Look after several Laravel or PHP apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie
Affected packages
- Affected
- <1.9.10
- Fixed in
- 1.9.10
composer require sylius/sylius:^1.9.10- Affected
- >=1.10.0 <1.10.11
- Fixed in
- 1.10.11
composer require sylius/sylius:^1.10.11- Affected
- >=1.11.0 <1.11.2
- Fixed in
- 1.11.2
composer require sylius/sylius:^1.11.2Details
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
// 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:
# 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
- Email us at [security@sylius.com](mailto:security@sylius.com)
Is GHSA-4jp3-q2qm-9fmw in any of your client repos?
Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected sylius/sylius, and gives you the command that fixes it.
More advisories for sylius/sylius
- MediumCVE-2026-53639Sylius: IDOR on Shop Payment Request API endpoints · 9 Jul 2026
- MediumCVE-2026-53638Sylius: Channel-based payment method restriction bypass on shop account orders API endpoint · 9 Jul 2026
- MediumCVE-2026-53637Sylius: Cart FormComponent allows modification or deletion of an already-completed order · 9 Jul 2026
- MediumCVE-2026-31825Sylius has a DQL Injection via API Order Filters · 11 Mar 2026
- HighCVE-2026-31824Sylius has a Promotion Usage Limit Bypass via Race Condition · 11 Mar 2026
- MediumCVE-2026-31823Sylius Vulnerable to Authenticated Stored XSS · 11 Mar 2026
References
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.