Skip to main content

Boteraser | Website and Server Security Solutions

🛡️ CVE-2026-53637 — sylius

⚪ Unknown ✅ No Known Exploit CWE-672 OSV
N/A
CVSS Score
0 Low4 Medium7 High9 Critical10

Description

Sylius: Cart FormComponent allows modification or deletion of an already-completed order

Impact

A user opens the cart page in the browser. In the background, the order gets completed, e.g. an admin changes the status, or the user finalizes payment in another tab. The browser still displays the old cart: the LiveComponent is unaware the underlying order state has changed.

If the user then:

  • clears the cart → clearCart() calls manager->remove() on the

completed order: the order is permanently deleted from the database;

  • removes a product → removeItem() mutates an item on the completed

order;

  • changes quantity → saveCart() overwrites data on the completed order.

In all cases, the customer's order data is irreversibly corrupted or lost, even though the order has already been placed and paid for. The same vector can be triggered deliberately by an authenticated customer (keep the cart page open, complete checkout in another tab, then modify the "cart" to add quantity beyond what was paid for).

Patches

The issue is fixed in versions: 2.0.18, 2.1.15, 2.2.6 and above.

Workarounds

If users cannot update Sylius immediately, they should create a patched copy of the affected class in their application's src/ directory and override the Sylius service definition to use it.

Step 1. Create src/Twig/Component/Cart/FormComponent.php

```php

<?php

declare(strict_types=1);

namespace App\Twig\Component\Cart;

use Doctrine\Persistence\ObjectManager;

use Sylius\Bundle\UiBundle\Twig\Component\ResourceFormComponentTrait;

use Sylius\Bundle\UiBundle\Twig\Component\TemplatePropTrait;

use Sylius\Component\Core\Model\OrderInterface;

use Sylius\Component\Core\OrderCheckoutStates;

use Sylius\Component\Core\Repository\OrderRepositoryInterface;

use Sylius\Component\Order\SyliusCartEvents;

use Sylius\Resource\Model\ResourceInterface;

use Symfony\Component\EventDispatcher\EventDispatcherInterface;

use Symfony\Component\EventDispatcher\GenericEvent;

use Symfony\Component\Form\FormFactoryInterface;

use Symfony\UX\LiveComponent\Attribute\LiveAction;

use Symfony\UX\LiveComponent\Attribute\LiveArg;

use Symfony\UX\LiveComponent\Attribute\PreReRender;

use Symfony\UX\LiveComponent\ComponentToolsTrait;

class FormComponent

{

use ComponentToolsTrait;

/** @use ResourceFormComponentTrait<OrderInterface> */

use ResourceFormComponentTrait;

use TemplatePropTrait;

public const SYLIUS_SHOP_CART_CHANGED = 'sylius:shop:cart_changed';

public const SYLIUS_SHOP_CART_CLEARED = 'sylius:shop:cart_cleared';

public bool $shouldSaveCart = true;

/** @param OrderRepositoryInterface<OrderInterface> $orderRepository */

public function __construct(

OrderRepositoryInterface $orderRepository,

FormFactoryInterface $formFactory,

string $resourceClass,

string $formClass,

protected readonly ObjectManager $manager,

protected readonly EventDispatcherInterface $eventDispatcher,

) {

$this->initialize($orderRepository, $formFactory, $resourceClass, $formClass);

}

public function hydrateResource(mixed $value): ?ResourceInterface

{

if (empty($value)) {

return $this->createResource();

}

/** @var OrderInterface|null $order */

$order = $this->repository->find($value);

if (

!$order instanceof OrderInterface

|| $order->getCheckoutState() === OrderCheckoutStates::STATE_COMPLETED

) {

return $this->createResource();

}

return $order;

}

#[PreReRender(priority: -100)]

public function saveCart(): void

{

if ($this->shouldSaveCart && $this->resource?->getId() !== null) {

$form = $this->getForm();

if ($form->isValid()) {

$this->eventDispatcher->dispatch(new GenericEvent($form->getData()), SyliusCartEvents::CART_CHANGE);

$this->manager->flush();

$this->emit(self::SYLIUS_SHOP_CART_CHANGED, ['cartId' => $this->resource->getId()]);

}

}

}

#[LiveAction]

public function removeItem(#[LiveArg] int $index): void

{

if ($this->resource?->getId() === null) {

return;

}

$data = $this->formValues['items'];

unset($data[$index]);

$this->formValues['items'] = array_values($data);

$orderItem = $this->resource->getItems()->get($index);

$this->eventDispatcher->dispatch(new GenericEvent($orderItem), SyliusCartEvents::CART_ITEM_REMOVE);

$this->manager->persist($this->resource);

$this->manager->flush();

$this->manager->refresh($this->resource);

$this->shouldSaveCart = false;

$this->submitForm();

$this->emit(self::SYLIUS_SHOP_CART_CHANGED, ['cartId' => $this->resource->getId()]);

}

#[LiveAction]

public function clearCart(): void

{

if ($this->resource?->getId() === null

How this vulnerability can be exploited

This issue can be reached over the network, attack complexity is low, an attacker needs low-level privileges on the target. No user interaction is required. The scope is unchanged, so the impact stays within the vulnerable component. Rated impact: confidentiality none, integrity high, availability none.

CVSS metrics in full

The score comes from this vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N

  • Attack vector: Network — reachable from anywhere that can route to the service.
  • Attack complexity: Low — the attack works reliably, with no preparation.
  • Privileges required: Low — an ordinary user account is enough.
  • User interaction: None — nobody has to be tricked into anything.
  • Scope: Unchanged — the damage stays inside the vulnerable component.
  • Confidentiality impact: None.
  • Integrity impact: High — total loss, or loss the attacker controls.
  • Availability impact: None.

Weakness class

CVE-2026-53637 is classified as CWE-672: Operation on a Resource after Expiration or Release. A resource is used after it has been released or has expired.

Affected software

CVE-2026-53637 is recorded against 1 package.

  • sylius/sylius (from 2.2.0 up to 2.2.6)

Timeline and source

Published on 9 July 2026. No public exploit is currently recorded for this entry. Record sourced from OSV.

References

github.com (Web)
github.com (Package)

Other advisories for this package

sylius/sylius has other advisories on record. If you are patching this one, these are worth checking on the same host:

Same weakness in other software

These advisories are the same class of weakness (CWE-672: Operation on a Resource after Expiration or Release) in other software:

Details

Severity Unknown
CVSS Score N/A
CVSS Vector CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N
CWE CWE-672
Public Exploit ✅ No
Source OSV
Published 2026-07-09
Updated 2026-08-20
Modified 2026-07-09
Fix URL N/A

Affected Packages

Software From version Fixed in
sylius/sylius 2.2.0 2.2.6

Similar Threats

Free Vulnerability Check

Is your site affected by CVE-2026-53637?

BotEraser helps you identify potentially vulnerable plugins and themes by checking your installation against CVE-2026-53637 and other known CVE records.

Scan My Site Free →

No credit card required  ·  Results in minutes

ⓘ Data Notice: The information presented above has been compiled from publicly available internet sources. Boteraser aggregates this data solely for informational purposes and does not independently classify, evaluate, or endorse any findings about the vulnerabilities listed. The accuracy and completeness of this information is the sole responsibility of the original publishers. Boteraser and its operators accept no liability for any decisions made based on this data.

Browse related advisories

All advisoriesCVECVE 2026
✓