{
    "document": {
        "category": "csaf_base",
        "csaf_version": "2.0",
        "distribution": {
            "tlp": {
                "label": "WHITE"
            }
        },
        "lang": "en",
        "notes": [
            {
                "category": "legal_disclaimer",
                "text": "The Netherlands Cyber Security Center (henceforth: NCSC-NL) maintains this portal to enhance access to its information and vulnerabilities. The use of this information is subject to the following terms and conditions:\n\nThe vulnerabilities disclosed in this portal are gathered by NCSC-NL from a variety of open sources, which the user can retrieve from other platforms. NCSC-NL makes every reasonable effort to ensure that the content of this portal is kept up to date, and that it is accurate and complete. Nevertheless, NCSC-NL cannot entirely rule out the possibility of errors, and therefore cannot give any warranty in respect of its completeness, accuracy or real-time keeping up-to-date. NCSC-NL does not control nor guarantee the accuracy, relevance, timeliness or completeness of information obtained from these external sources. The vulnerabilities disclosed in this portal are intended solely for the convenience of professional parties to take appropriate measures to manage the risks posed to the cybersecurity. No rights can be derived from the information provided therein.\n\nNCSC-NL and the Kingdom of the Netherlands assume no legal liability or responsibility for any damage resulting from either the use or inability of use of the vulnerabilities disclosed in this portal. This includes damage resulting from the inaccuracy of incompleteness of the information contained in it.\nThe information on this page is subject to Dutch law. All disputes related to or arising from the use of this portal regarding the disclosure of vulnerabilities will be submitted to the competent court in The Hague. This choice of means also applies to the court in summary proceedings."
            }
        ],
        "publisher": {
            "category": "coordinator",
            "contact_details": "cert@ncsc.nl",
            "name": "National Cyber Security Centre",
            "namespace": "https://www.ncsc.nl/"
        },
        "title": "CVE-2026-31820",
        "tracking": {
            "current_release_date": "2026-03-20T09:32:54.607781Z",
            "generator": {
                "date": "2026-02-17T15:00:00Z",
                "engine": {
                    "name": "V.E.L.M.A",
                    "version": "1.7"
                }
            },
            "id": "CVE-2026-31820",
            "initial_release_date": "2026-03-10T21:38:53.698785Z",
            "revision_history": [
                {
                    "date": "2026-03-10T21:38:53.698785Z",
                    "number": "1",
                    "summary": "CVE created.| Source created.| CVE status created. (valid)| Description created for source.| CVSS created.| Products connected (3).| References created (1).| CWES updated (1)."
                },
                {
                    "date": "2026-03-10T21:38:55.439922Z",
                    "number": "2",
                    "summary": "NCSC Score created."
                },
                {
                    "date": "2026-03-10T22:25:57.916180Z",
                    "number": "3",
                    "summary": "Source created.| CVE status created. (valid)| Description created for source.| CVSS created.| References created (1).| CWES updated (1)."
                },
                {
                    "date": "2026-03-10T22:26:01.174367Z",
                    "number": "4",
                    "summary": "NCSC Score updated."
                },
                {
                    "date": "2026-03-11T00:53:23.375951Z",
                    "number": "5",
                    "summary": "Source created.| CVE status created. (valid)| Description created for source.| CVSS created.| References created (2).| CWES updated (1)."
                },
                {
                    "date": "2026-03-11T00:53:26.861994Z",
                    "number": "6",
                    "summary": "NCSC Score updated."
                },
                {
                    "date": "2026-03-11T06:39:57.532857Z",
                    "number": "7",
                    "summary": "References created (1)."
                },
                {
                    "date": "2026-03-11T14:54:34.464334Z",
                    "number": "8",
                    "summary": "Source created.| CVE status created. (valid)| EPSS created."
                },
                {
                    "date": "2026-03-11T14:54:40.522348Z",
                    "number": "9",
                    "summary": "NCSC Score updated."
                },
                {
                    "date": "2026-03-11T16:39:32.873747Z",
                    "number": "10",
                    "summary": "Unknown change."
                },
                {
                    "date": "2026-03-11T20:25:54.863821Z",
                    "number": "11",
                    "summary": "CVSS created.| Products connected (3).| Product Identifiers created (3)."
                },
                {
                    "date": "2026-03-11T20:26:02.433501Z",
                    "number": "12",
                    "summary": "NCSC Score updated."
                },
                {
                    "date": "2026-03-19T15:29:43.407828Z",
                    "number": "13",
                    "summary": "Source created.| CVE status created. (valid)| Description created for source.| CVSS created.| References created (3).| CWES updated (1)."
                },
                {
                    "date": "2026-03-19T15:29:46.200313Z",
                    "number": "14",
                    "summary": "NCSC Score updated."
                },
                {
                    "date": "2026-03-20T09:32:48.545338Z",
                    "number": "15",
                    "summary": "Source connected.| CVE status created. (valid)| EPSS created."
                },
                {
                    "date": "2026-03-20T09:32:52.384428Z",
                    "number": "16",
                    "summary": "NCSC Score updated."
                }
            ],
            "status": "interim",
            "version": "16"
        }
    },
    "product_tree": {
        "branches": [
            {
                "branches": [
                    {
                        "branches": [
                            {
                                "category": "product_version_range",
                                "name": "vers:unknown/>=2.0.0|<2.0.16",
                                "product": {
                                    "name": "vers:unknown/>=2.0.0|<2.0.16",
                                    "product_id": "CSAFPID-5778702",
                                    "product_identification_helper": {
                                        "cpe": "cpe:2.3:a:sylius:sylius:*:*:*:*:*:*:*:*"
                                    }
                                }
                            },
                            {
                                "category": "product_version_range",
                                "name": "vers:unknown/>=2.1.0|<2.1.12",
                                "product": {
                                    "name": "vers:unknown/>=2.1.0|<2.1.12",
                                    "product_id": "CSAFPID-5778701",
                                    "product_identification_helper": {
                                        "cpe": "cpe:2.3:a:sylius:sylius:*:*:*:*:*:*:*:*"
                                    }
                                }
                            },
                            {
                                "category": "product_version_range",
                                "name": "vers:unknown/>=2.2.0|<2.2.3",
                                "product": {
                                    "name": "vers:unknown/>=2.2.0|<2.2.3",
                                    "product_id": "CSAFPID-5778700",
                                    "product_identification_helper": {
                                        "cpe": "cpe:2.3:a:sylius:sylius:*:*:*:*:*:*:*:*"
                                    }
                                }
                            }
                        ],
                        "category": "product_name",
                        "name": "Sylius"
                    }
                ],
                "category": "vendor",
                "name": "Sylius"
            }
        ]
    },
    "vulnerabilities": [
        {
            "cve": "CVE-2026-31820",
            "cwe": {
                "id": "CWE-639",
                "name": "Authorization Bypass Through User-Controlled Key"
            },
            "notes": [
                {
                    "category": "description",
                    "text": "### Impact\nAn authenticated Insecure Direct Object Reference (IDOR) vulnerability exists in multiple shop LiveComponents due to unvalidated resource IDs accepted via `#[LiveArg]` parameters. Unlike props, which are protected by LiveComponent's `@checksum`, `args` are fully user-controlled - any action that accepts a resource ID via `#[LiveArg]` and loads it with `->find()` without ownership validation is vulnerable.\n\nCheckout address **FormComponent** (`addressFieldUpdated` action): Accepts an `addressId` via `#[LiveArg]` and loads it without verifying ownership, exposing another user's first name, last name, company, phone number, street, city, postcode, and country.\n\nCart **WidgetComponent** (`refreshCart` action): Accepts a `cartId` via `#[LiveArg]` and loads any order directly from the repository, exposing order total and item count.\n\nCart **SummaryComponent** (`refreshCart` action): Accepts a `cartId` via `#[LiveArg]` and loads any order directly from the repository, exposing subtotal, discount, shipping cost, taxes (excluded and included), and order total.\n\nSince `sylius_order` contains both active carts (`state=cart`) and completed orders (`state=new/fulfilled`) in the same ID space, the cart IDOR exposes data from all orders, not just active carts.\n\n### Patches\nThe issue is fixed in versions: 2.0.16, 2.1.12, 2.2.3 and above.\n\n### Workarounds\n\nOverride vulnerable LiveComponent classes at the project level to add authorization checks to `#[LiveArg]` parameters.\n\n#### Step 1. Exclude component overrides from default autowiring\n\nIn `config/services.yaml`, add `Twig/Component` to the exclude list to prevent duplicate service registration:\n\n```yaml\nApp\\:\n    resource: '../src/*'\n    exclude: '../src/{Entity,Kernel.php,Twig/Components}'\n```\n\n#### Step 2. Override checkout address FormComponent\n\nCreate `src/Twig/Components/Checkout/Address/FormComponent.php`:\n\n```php\n<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Twig\\Components\\Checkout\\Address;\n\nuse Sylius\\Bundle\\ShopBundle\\Twig\\Component\\Checkout\\Address\\AddressBookComponent;\nuse Sylius\\Bundle\\UiBundle\\Twig\\Component\\ResourceFormComponentTrait;\nuse Sylius\\Bundle\\UiBundle\\Twig\\Component\\TemplatePropTrait;\nuse Sylius\\Component\\Core\\Model\\OrderInterface;\nuse Sylius\\Component\\Core\\Model\\ShopUserInterface;\nuse Sylius\\Component\\Core\\Repository\\AddressRepositoryInterface;\nuse Sylius\\Component\\Core\\Repository\\OrderRepositoryInterface;\nuse Sylius\\Component\\Customer\\Context\\CustomerContextInterface;\nuse Sylius\\Component\\User\\Repository\\UserRepositoryInterface;\nuse Symfony\\Component\\Form\\FormFactoryInterface;\nuse Symfony\\Component\\Form\\FormInterface;\nuse Symfony\\UX\\LiveComponent\\Attribute\\AsLiveComponent;\nuse Symfony\\UX\\LiveComponent\\Attribute\\LiveArg;\nuse Symfony\\UX\\LiveComponent\\Attribute\\LiveListener;\nuse Symfony\\UX\\LiveComponent\\Attribute\\LiveProp;\nuse Symfony\\UX\\LiveComponent\\Attribute\\PreReRender;\n\n#[AsLiveComponent]\nclass FormComponent\n{\n    /** @use ResourceFormComponentTrait<OrderInterface> */\n    use ResourceFormComponentTrait;\n    use TemplatePropTrait;\n\n    #[LiveProp]\n    public bool $emailExists = false;\n\n    /**\n     * @param OrderRepositoryInterface<OrderInterface> $repository\n     * @param UserRepositoryInterface<ShopUserInterface> $shopUserRepository\n     */\n    public function __construct(\n        OrderRepositoryInterface $repository,\n        FormFactoryInterface $formFactory,\n        string $resourceClass,\n        string $formClass,\n        protected readonly CustomerContextInterface $customerContext,\n        protected readonly UserRepositoryInterface $shopUserRepository,\n        protected readonly AddressRepositoryInterface $addressRepository,\n    ) {\n        $this->initialize($repository, $formFactory, $resourceClass, $formClass);\n    }\n\n    #[PreReRender(priority: -100)]\n    public function checkEmailExist(): void\n    {\n        $email = $this->formValues['customer']['email'] ?? null;\n        if (null !== $email) {\n            $this->emailExists = $this->shopUserRepository->findOneByEmail($email) !== null;\n        }\n    }\n\n    #[LiveListener(AddressBookComponent::SYLIUS_SHOP_ADDRESS_UPDATED)]\n    public function addressFieldUpdated(#[LiveArg] mixed $addressId, #[LiveArg] string $field): void\n    {\n        $customer = $this->customerContext->getCustomer();\n        if (null === $customer) {\n            return;\n        }\n\n        // Fix: findOneByCustomer instead of find — validates ownership\n        $address = $this->addressRepository->findOneByCustomer((string) $addressId, $customer);\n        if (null === $address) {\n            return;\n        }\n\n        $newAddress = [];\n        $newAddress['firstName'] = $address->getFirstName();\n        $newAddress['lastName'] = $address->getLastName();\n        $newAddress['phoneNumber'] = $address->getPhoneNumber();\n        $newAddress['company'] = $address->getCompany();\n        $newAddress['countryCode'] = $address->getCountryCode();\n        if ($address->getProvinceCode() !== null) {\n            $newAddress['provinceCode'] = $address->getProvinceCode();\n        }\n        if ($address->getProvinceName() !== null) {\n            $newAddress['provinceName'] = $address->getProvinceName();\n        }\n        $newAddress['street'] = $address->getStreet();\n        $newAddress['city'] = $address->getCity();\n        $newAddress['postcode'] = $address->getPostcode();\n\n        $this->formValues[$field] = $newAddress;\n    }\n\n    protected function instantiateForm(): FormInterface\n    {\n        return $this->formFactory->create(\n            $this->formClass,\n            $this->resource,\n            ['customer' => $this->customerContext->getCustomer()],\n        );\n    }\n}\n```\n\n#### Step 3. Override cart WidgetComponent\n\nCreate `src/Twig/Components/Cart/WidgetComponent.php`:\n\n```php\n<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Twig\\Components\\Cart;\n\nuse Sylius\\Bundle\\ShopBundle\\Twig\\Component\\Cart\\FormComponent;\nuse Sylius\\Bundle\\UiBundle\\Twig\\Component\\ResourceLivePropTrait;\nuse Sylius\\Bundle\\UiBundle\\Twig\\Component\\TemplatePropTrait;\nuse Sylius\\Component\\Core\\Model\\OrderInterface;\nuse Sylius\\Component\\Core\\Repository\\OrderRepositoryInterface;\nuse Sylius\\Component\\Order\\Context\\CartContextInterface;\nuse Sylius\\Component\\Order\\Context\\CartNotFoundException;\nuse Sylius\\Resource\\Model\\ResourceInterface;\nuse Sylius\\TwigHooks\\LiveComponent\\HookableLiveComponentTrait;\nuse Symfony\\UX\\LiveComponent\\Attribute\\AsLiveComponent;\nuse Symfony\\UX\\LiveComponent\\Attribute\\LiveArg;\nuse Symfony\\UX\\LiveComponent\\Attribute\\LiveListener;\nuse Symfony\\UX\\LiveComponent\\Attribute\\LiveProp;\nuse Symfony\\UX\\LiveComponent\\DefaultActionTrait;\nuse Symfony\\UX\\TwigComponent\\Attribute\\PreMount;\n\n#[AsLiveComponent]\nclass WidgetComponent\n{\n    use DefaultActionTrait;\n    use HookableLiveComponentTrait;\n    use TemplatePropTrait;\n\n    /** @use ResourceLivePropTrait<OrderInterface> */\n    use ResourceLivePropTrait;\n\n    #[LiveProp(hydrateWith: 'hydrateResource', dehydrateWith: 'dehydrateResource')]\n    public ?ResourceInterface $cart = null;\n\n    public function __construct(\n        protected readonly CartContextInterface $cartContext,\n        OrderRepositoryInterface $orderRepository,\n    ) {\n        $this->initialize($orderRepository);\n    }\n\n    #[PreMount]\n    public function initializeCart(): void\n    {\n        $this->cart = $this->getCart();\n    }\n\n    #[LiveListener(FormComponent::SYLIUS_SHOP_CART_CHANGED)]\n    #[LiveListener(FormComponent::SYLIUS_SHOP_CART_CLEARED)]\n    public function refreshCart(#[LiveArg] mixed $cartId = null): void\n    {\n        // Fix: ignore user-supplied cartId, always load from session\n        $this->cart = $this->getCart();\n    }\n\n    private function getCart(): ?OrderInterface\n    {\n        try {\n            return $this->cartContext->getCart();\n        } catch (CartNotFoundException) {\n            return null;\n        }\n\n       return $cart;\n    }\n}\n```\n\n#### Step 4. Override cart SummaryComponent\n\nCreate `src/Twig/Components/Cart/SummaryComponent.php`:\n\n```php\n<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Twig\\Components\\Cart;\n\nuse Sylius\\Bundle\\ShopBundle\\Twig\\Component\\Cart\\FormComponent;\nuse Sylius\\Bundle\\UiBundle\\Twig\\Component\\ResourceLivePropTrait;\nuse Sylius\\Bundle\\UiBundle\\Twig\\Component\\TemplatePropTrait;\nuse Sylius\\Component\\Core\\Model\\OrderInterface;\nuse Sylius\\Component\\Core\\Repository\\OrderRepositoryInterface;\nuse Sylius\\Resource\\Model\\ResourceInterface;\nuse Sylius\\TwigHooks\\LiveComponent\\HookableLiveComponentTrait;\nuse Symfony\\UX\\LiveComponent\\Attribute\\AsLiveComponent;\nuse Symfony\\UX\\LiveComponent\\Attribute\\LiveArg;\nuse Symfony\\UX\\LiveComponent\\Attribute\\LiveListener;\nuse Symfony\\UX\\LiveComponent\\Attribute\\LiveProp;\nuse Symfony\\UX\\LiveComponent\\DefaultActionTrait;\n\n#[AsLiveComponent]\nclass SummaryComponent\n{\n    use DefaultActionTrait;\n    use HookableLiveComponentTrait;\n\n    /** @use ResourceLivePropTrait<OrderInterface> */\n    use ResourceLivePropTrait;\n    use TemplatePropTrait;\n\n    #[LiveProp(hydrateWith: 'hydrateResource', dehydrateWith: 'dehydrateResource')]\n    public ?ResourceInterface $cart = null;\n\n    /** @param OrderRepositoryInterface<OrderInterface> $orderRepository */\n    public function __construct(OrderRepositoryInterface $orderRepository)\n    {\n        $this->initialize($orderRepository);\n    }\n\n    #[LiveListener(FormComponent::SYLIUS_SHOP_CART_CHANGED)]\n    public function refreshCart(#[LiveArg] mixed $cartId): void\n    {\n        // Fix: ignore user-supplied cartId, reload from checksummed cart prop\n        if ($this->cart === null) {\n            return;\n        }\n\n        $this->cart = $this->hydrateResource($this->cart->getId());\n    }\n}\n```\n\n#### Step 5. Register overridden services\n\nIn `config/services.yaml`, add:\n\n```yaml\n    sylius_shop.twig.component.checkout.address.form:\n        class: App\\Twig\\Components\\Checkout\\Address\\FormComponent\n        arguments:\n            $repository: '@sylius.repository.order'\n            $formFactory: '@form.factory'\n            $resourceClass: '%sylius.model.order.class%'\n            $formClass: 'Sylius\\Bundle\\ShopBundle\\Form\\Type\\Checkout\\AddressType'\n            $customerContext: '@sylius.context.customer'\n            $shopUserRepository: '@sylius.repository.shop_user'\n            $addressRepository: '@sylius.repository.address'\n        tags:\n            - { name: 'sylius.live_component.shop', key: 'sylius_shop:checkout:address:form' }\n\n    sylius_shop.twig.component.cart.widget:\n        class: App\\Twig\\Components\\Cart\\WidgetComponent\n        arguments:\n            $cartContext: '@sylius.context.cart.composite'\n            $orderRepository: '@sylius.repository.order'\n        tags:\n            - { name: 'sylius.live_component.shop', key: 'sylius_shop:cart:widget' }\n\n    sylius_shop.twig.component.cart.summary:\n        class: App\\Twig\\Components\\Cart\\SummaryComponent\n        arguments:\n            $orderRepository: '@sylius.repository.order'\n        tags:\n            - { name: 'sylius.live_component.shop', key: 'sylius_shop:cart:summary' }\n```\n\n#### Step 6. Clear cache\n\n```bash\nphp bin/console cache:clear\n```\n\n### Reporters\n\nWe would like to extend our gratitude to the following individuals for their detailed reporting and responsible disclosure of this vulnerability:\n- Peter Stöckli (@p-)\n- Man Yue Mo (@m-y-mo)\n- The [GitHub Security Lab](https://securitylab.github.com) team\n\n### For more information\nIf you have any questions or comments about this advisory:\n\n- Open an issue in [Sylius issues](https://github.com/Sylius/Sylius/issues?q=sort%3Aupdated-desc+is%3Aissue+is%3Aopen)\n- Email us at [security@sylius.com](mailto:security@sylius.com)",
                    "title": "github - https://api.github.com/advisories/GHSA-2xc6-348p-c2x6"
                },
                {
                    "category": "description",
                    "text": "Sylius is an Open Source eCommerce Framework on Symfony. An authenticated Insecure Direct Object Reference (IDOR) vulnerability exists in multiple shop LiveComponents due to unvalidated resource IDs accepted via #[LiveArg] parameters. Unlike props, which are protected by LiveComponent's @checksum, args are fully user-controlled - any action that accepts a resource ID via #[LiveArg] and loads it with ->find() without ownership validation is vulnerable. Checkout address FormComponent (addressFieldUpdated action): Accepts an addressId via #[LiveArg] and loads it without verifying ownership, exposing another user's first name, last name, company, phone number, street, city, postcode, and country. Cart WidgetComponent (refreshCart action): Accepts a cartId via #[LiveArg] and loads any order directly from the repository, exposing order total and item count. Cart SummaryComponent (refreshCart action): Accepts a cartId via #[LiveArg] and loads any order directly from the repository, exposing subtotal, discount, shipping cost, taxes (excluded and included), and order total. Since sylius_order contains both active carts (state=cart) and completed orders (state=new/fulfilled) in the same ID space, the cart IDOR exposes data from all orders, not just active carts. The issue is fixed in versions: 2.0.16, 2.1.12, 2.2.3 and above.",
                    "title": "cveprojectv5 - https://www.cve.org/CVERecord?id=CVE-2026-31820"
                },
                {
                    "category": "description",
                    "text": "Sylius is an Open Source eCommerce Framework on Symfony. An authenticated Insecure Direct Object Reference (IDOR) vulnerability exists in multiple shop LiveComponents due to unvalidated resource IDs accepted via #[LiveArg] parameters. Unlike props, which are protected by LiveComponent's @checksum, args are fully user-controlled - any action that accepts a resource ID via #[LiveArg] and loads it with ->find() without ownership validation is vulnerable. Checkout address FormComponent (addressFieldUpdated action): Accepts an addressId via #[LiveArg] and loads it without verifying ownership, exposing another user's first name, last name, company, phone number, street, city, postcode, and country. Cart WidgetComponent (refreshCart action): Accepts a cartId via #[LiveArg] and loads any order directly from the repository, exposing order total and item count. Cart SummaryComponent (refreshCart action): Accepts a cartId via #[LiveArg] and loads any order directly from the repository, exposing subtotal, discount, shipping cost, taxes (excluded and included), and order total. Since sylius_order contains both active carts (state=cart) and completed orders (state=new/fulfilled) in the same ID space, the cart IDOR exposes data from all orders, not just active carts. The issue is fixed in versions: 2.0.16, 2.1.12, 2.2.3 and above.",
                    "title": "nvd - https://nvd.nist.gov/vuln/detail/CVE-2026-31820"
                },
                {
                    "category": "description",
                    "text": "### Impact\nAn authenticated Insecure Direct Object Reference (IDOR) vulnerability exists in multiple shop LiveComponents due to unvalidated resource IDs accepted via `#[LiveArg]` parameters. Unlike props, which are protected by LiveComponent's `@checksum`, `args` are fully user-controlled - any action that accepts a resource ID via `#[LiveArg]` and loads it with `->find()` without ownership validation is vulnerable.\n\nCheckout address **FormComponent** (`addressFieldUpdated` action): Accepts an `addressId` via `#[LiveArg]` and loads it without verifying ownership, exposing another user's first name, last name, company, phone number, street, city, postcode, and country.\n\nCart **WidgetComponent** (`refreshCart` action): Accepts a `cartId` via `#[LiveArg]` and loads any order directly from the repository, exposing order total and item count.\n\nCart **SummaryComponent** (`refreshCart` action): Accepts a `cartId` via `#[LiveArg]` and loads any order directly from the repository, exposing subtotal, discount, shipping cost, taxes (excluded and included), and order total.\n\nSince `sylius_order` contains both active carts (`state=cart`) and completed orders (`state=new/fulfilled`) in the same ID space, the cart IDOR exposes data from all orders, not just active carts.\n\n### Patches\nThe issue is fixed in versions: 2.0.16, 2.1.12, 2.2.3 and above.\n\n### Workarounds\n\nOverride vulnerable LiveComponent classes at the project level to add authorization checks to `#[LiveArg]` parameters.\n\n#### Step 1. Exclude component overrides from default autowiring\n\nIn `config/services.yaml`, add `Twig/Component` to the exclude list to prevent duplicate service registration:\n\n```yaml\nApp\\:\n    resource: '../src/*'\n    exclude: '../src/{Entity,Kernel.php,Twig/Components}'\n```\n\n#### Step 2. Override checkout address FormComponent\n\nCreate `src/Twig/Components/Checkout/Address/FormComponent.php`:\n\n```php\n<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Twig\\Components\\Checkout\\Address;\n\nuse Sylius\\Bundle\\ShopBundle\\Twig\\Component\\Checkout\\Address\\AddressBookComponent;\nuse Sylius\\Bundle\\UiBundle\\Twig\\Component\\ResourceFormComponentTrait;\nuse Sylius\\Bundle\\UiBundle\\Twig\\Component\\TemplatePropTrait;\nuse Sylius\\Component\\Core\\Model\\OrderInterface;\nuse Sylius\\Component\\Core\\Model\\ShopUserInterface;\nuse Sylius\\Component\\Core\\Repository\\AddressRepositoryInterface;\nuse Sylius\\Component\\Core\\Repository\\OrderRepositoryInterface;\nuse Sylius\\Component\\Customer\\Context\\CustomerContextInterface;\nuse Sylius\\Component\\User\\Repository\\UserRepositoryInterface;\nuse Symfony\\Component\\Form\\FormFactoryInterface;\nuse Symfony\\Component\\Form\\FormInterface;\nuse Symfony\\UX\\LiveComponent\\Attribute\\AsLiveComponent;\nuse Symfony\\UX\\LiveComponent\\Attribute\\LiveArg;\nuse Symfony\\UX\\LiveComponent\\Attribute\\LiveListener;\nuse Symfony\\UX\\LiveComponent\\Attribute\\LiveProp;\nuse Symfony\\UX\\LiveComponent\\Attribute\\PreReRender;\n\n#[AsLiveComponent]\nclass FormComponent\n{\n    /** @use ResourceFormComponentTrait<OrderInterface> */\n    use ResourceFormComponentTrait;\n    use TemplatePropTrait;\n\n    #[LiveProp]\n    public bool $emailExists = false;\n\n    /**\n     * @param OrderRepositoryInterface<OrderInterface> $repository\n     * @param UserRepositoryInterface<ShopUserInterface> $shopUserRepository\n     */\n    public function __construct(\n        OrderRepositoryInterface $repository,\n        FormFactoryInterface $formFactory,\n        string $resourceClass,\n        string $formClass,\n        protected readonly CustomerContextInterface $customerContext,\n        protected readonly UserRepositoryInterface $shopUserRepository,\n        protected readonly AddressRepositoryInterface $addressRepository,\n    ) {\n        $this->initialize($repository, $formFactory, $resourceClass, $formClass);\n    }\n\n    #[PreReRender(priority: -100)]\n    public function checkEmailExist(): void\n    {\n        $email = $this->formValues['customer']['email'] ?? null;\n        if (null !== $email) {\n            $this->emailExists = $this->shopUserRepository->findOneByEmail($email) !== null;\n        }\n    }\n\n    #[LiveListener(AddressBookComponent::SYLIUS_SHOP_ADDRESS_UPDATED)]\n    public function addressFieldUpdated(#[LiveArg] mixed $addressId, #[LiveArg] string $field): void\n    {\n        $customer = $this->customerContext->getCustomer();\n        if (null === $customer) {\n            return;\n        }\n\n        // Fix: findOneByCustomer instead of find — validates ownership\n        $address = $this->addressRepository->findOneByCustomer((string) $addressId, $customer);\n        if (null === $address) {\n            return;\n        }\n\n        $newAddress = [];\n        $newAddress['firstName'] = $address->getFirstName();\n        $newAddress['lastName'] = $address->getLastName();\n        $newAddress['phoneNumber'] = $address->getPhoneNumber();\n        $newAddress['company'] = $address->getCompany();\n        $newAddress['countryCode'] = $address->getCountryCode();\n        if ($address->getProvinceCode() !== null) {\n            $newAddress['provinceCode'] = $address->getProvinceCode();\n        }\n        if ($address->getProvinceName() !== null) {\n            $newAddress['provinceName'] = $address->getProvinceName();\n        }\n        $newAddress['street'] = $address->getStreet();\n        $newAddress['city'] = $address->getCity();\n        $newAddress['postcode'] = $address->getPostcode();\n\n        $this->formValues[$field] = $newAddress;\n    }\n\n    protected function instantiateForm(): FormInterface\n    {\n        return $this->formFactory->create(\n            $this->formClass,\n            $this->resource,\n            ['customer' => $this->customerContext->getCustomer()],\n        );\n    }\n}\n```\n\n#### Step 3. Override cart WidgetComponent\n\nCreate `src/Twig/Components/Cart/WidgetComponent.php`:\n\n```php\n<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Twig\\Components\\Cart;\n\nuse Sylius\\Bundle\\ShopBundle\\Twig\\Component\\Cart\\FormComponent;\nuse Sylius\\Bundle\\UiBundle\\Twig\\Component\\ResourceLivePropTrait;\nuse Sylius\\Bundle\\UiBundle\\Twig\\Component\\TemplatePropTrait;\nuse Sylius\\Component\\Core\\Model\\OrderInterface;\nuse Sylius\\Component\\Core\\Repository\\OrderRepositoryInterface;\nuse Sylius\\Component\\Order\\Context\\CartContextInterface;\nuse Sylius\\Component\\Order\\Context\\CartNotFoundException;\nuse Sylius\\Resource\\Model\\ResourceInterface;\nuse Sylius\\TwigHooks\\LiveComponent\\HookableLiveComponentTrait;\nuse Symfony\\UX\\LiveComponent\\Attribute\\AsLiveComponent;\nuse Symfony\\UX\\LiveComponent\\Attribute\\LiveArg;\nuse Symfony\\UX\\LiveComponent\\Attribute\\LiveListener;\nuse Symfony\\UX\\LiveComponent\\Attribute\\LiveProp;\nuse Symfony\\UX\\LiveComponent\\DefaultActionTrait;\nuse Symfony\\UX\\TwigComponent\\Attribute\\PreMount;\n\n#[AsLiveComponent]\nclass WidgetComponent\n{\n    use DefaultActionTrait;\n    use HookableLiveComponentTrait;\n    use TemplatePropTrait;\n\n    /** @use ResourceLivePropTrait<OrderInterface> */\n    use ResourceLivePropTrait;\n\n    #[LiveProp(hydrateWith: 'hydrateResource', dehydrateWith: 'dehydrateResource')]\n    public ?ResourceInterface $cart = null;\n\n    public function __construct(\n        protected readonly CartContextInterface $cartContext,\n        OrderRepositoryInterface $orderRepository,\n    ) {\n        $this->initialize($orderRepository);\n    }\n\n    #[PreMount]\n    public function initializeCart(): void\n    {\n        $this->cart = $this->getCart();\n    }\n\n    #[LiveListener(FormComponent::SYLIUS_SHOP_CART_CHANGED)]\n    #[LiveListener(FormComponent::SYLIUS_SHOP_CART_CLEARED)]\n    public function refreshCart(#[LiveArg] mixed $cartId = null): void\n    {\n        // Fix: ignore user-supplied cartId, always load from session\n        $this->cart = $this->getCart();\n    }\n\n    private function getCart(): ?OrderInterface\n    {\n        try {\n            return $this->cartContext->getCart();\n        } catch (CartNotFoundException) {\n            return null;\n        }\n\n       return $cart;\n    }\n}\n```\n\n#### Step 4. Override cart SummaryComponent\n\nCreate `src/Twig/Components/Cart/SummaryComponent.php`:\n\n```php\n<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Twig\\Components\\Cart;\n\nuse Sylius\\Bundle\\ShopBundle\\Twig\\Component\\Cart\\FormComponent;\nuse Sylius\\Bundle\\UiBundle\\Twig\\Component\\ResourceLivePropTrait;\nuse Sylius\\Bundle\\UiBundle\\Twig\\Component\\TemplatePropTrait;\nuse Sylius\\Component\\Core\\Model\\OrderInterface;\nuse Sylius\\Component\\Core\\Repository\\OrderRepositoryInterface;\nuse Sylius\\Resource\\Model\\ResourceInterface;\nuse Sylius\\TwigHooks\\LiveComponent\\HookableLiveComponentTrait;\nuse Symfony\\UX\\LiveComponent\\Attribute\\AsLiveComponent;\nuse Symfony\\UX\\LiveComponent\\Attribute\\LiveArg;\nuse Symfony\\UX\\LiveComponent\\Attribute\\LiveListener;\nuse Symfony\\UX\\LiveComponent\\Attribute\\LiveProp;\nuse Symfony\\UX\\LiveComponent\\DefaultActionTrait;\n\n#[AsLiveComponent]\nclass SummaryComponent\n{\n    use DefaultActionTrait;\n    use HookableLiveComponentTrait;\n\n    /** @use ResourceLivePropTrait<OrderInterface> */\n    use ResourceLivePropTrait;\n    use TemplatePropTrait;\n\n    #[LiveProp(hydrateWith: 'hydrateResource', dehydrateWith: 'dehydrateResource')]\n    public ?ResourceInterface $cart = null;\n\n    /** @param OrderRepositoryInterface<OrderInterface> $orderRepository */\n    public function __construct(OrderRepositoryInterface $orderRepository)\n    {\n        $this->initialize($orderRepository);\n    }\n\n    #[LiveListener(FormComponent::SYLIUS_SHOP_CART_CHANGED)]\n    public function refreshCart(#[LiveArg] mixed $cartId): void\n    {\n        // Fix: ignore user-supplied cartId, reload from checksummed cart prop\n        if ($this->cart === null) {\n            return;\n        }\n\n        $this->cart = $this->hydrateResource($this->cart->getId());\n    }\n}\n```\n\n#### Step 5. Register overridden services\n\nIn `config/services.yaml`, add:\n\n```yaml\n    sylius_shop.twig.component.checkout.address.form:\n        class: App\\Twig\\Components\\Checkout\\Address\\FormComponent\n        arguments:\n            $repository: '@sylius.repository.order'\n            $formFactory: '@form.factory'\n            $resourceClass: '%sylius.model.order.class%'\n            $formClass: 'Sylius\\Bundle\\ShopBundle\\Form\\Type\\Checkout\\AddressType'\n            $customerContext: '@sylius.context.customer'\n            $shopUserRepository: '@sylius.repository.shop_user'\n            $addressRepository: '@sylius.repository.address'\n        tags:\n            - { name: 'sylius.live_component.shop', key: 'sylius_shop:checkout:address:form' }\n\n    sylius_shop.twig.component.cart.widget:\n        class: App\\Twig\\Components\\Cart\\WidgetComponent\n        arguments:\n            $cartContext: '@sylius.context.cart.composite'\n            $orderRepository: '@sylius.repository.order'\n        tags:\n            - { name: 'sylius.live_component.shop', key: 'sylius_shop:cart:widget' }\n\n    sylius_shop.twig.component.cart.summary:\n        class: App\\Twig\\Components\\Cart\\SummaryComponent\n        arguments:\n            $orderRepository: '@sylius.repository.order'\n        tags:\n            - { name: 'sylius.live_component.shop', key: 'sylius_shop:cart:summary' }\n```\n\n#### Step 6. Clear cache\n\n```bash\nphp bin/console cache:clear\n```\n\n### Reporters\n\nWe would like to extend our gratitude to the following individuals for their detailed reporting and responsible disclosure of this vulnerability:\n- Peter Stöckli (@p-)\n- Man Yue Mo (@m-y-mo)\n- The [GitHub Security Lab](https://securitylab.github.com) team\n\n### For more information\nIf you have any questions or comments about this advisory:\n\n- Open an issue in [Sylius issues](https://github.com/Sylius/Sylius/issues?q=sort%3Aupdated-desc+is%3Aissue+is%3Aopen)\n- Email us at [security@sylius.com](mailto:security@sylius.com)",
                    "title": "github - https://github.com/advisories/GHSA-2xc6-348p-c2x6"
                },
                {
                    "category": "other",
                    "text": "0.00035",
                    "title": "EPSS"
                },
                {
                    "category": "other",
                    "text": "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N",
                    "title": "CVSSV4"
                },
                {
                    "category": "other",
                    "text": "7.1",
                    "title": "CVSSV4 base score"
                },
                {
                    "category": "other",
                    "text": "4.2",
                    "title": "NCSC Score"
                },
                {
                    "category": "other",
                    "text": "The value of the most recent EPSS score, The value of the most recent CVSS (V3) score, Is related to (a version of) an uncommon product",
                    "title": "NCSC Score top decreasing factors"
                }
            ],
            "product_status": {
                "known_affected": [
                    "CSAFPID-5778700",
                    "CSAFPID-5778701",
                    "CSAFPID-5778702"
                ]
            },
            "references": [
                {
                    "category": "external",
                    "summary": "Source - cveprojectv5",
                    "url": "https://www.cve.org/CVERecord?id=CVE-2026-31820"
                },
                {
                    "category": "external",
                    "summary": "Source raw - cveprojectv5",
                    "url": "https://raw.githubusercontent.com/CVEProject/cvelistV5/main/cves/2026/31xxx/CVE-2026-31820.json"
                },
                {
                    "category": "external",
                    "summary": "Source - nvd",
                    "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-31820"
                },
                {
                    "category": "external",
                    "summary": "Source raw - nvd",
                    "url": "https://services.nvd.nist.gov/rest/json/cves/2.0?cveId=CVE-2026-31820"
                },
                {
                    "category": "external",
                    "summary": "Source - github",
                    "url": "https://github.com/advisories/GHSA-2xc6-348p-c2x6"
                },
                {
                    "category": "external",
                    "summary": "Source raw - github",
                    "url": "https://api.github.com/advisories/GHSA-2xc6-348p-c2x6"
                },
                {
                    "category": "external",
                    "summary": "Source - first",
                    "url": "https://api.first.org/data/v1/epss?cve=CVE-2026-31820"
                },
                {
                    "category": "external",
                    "summary": "Source raw - first",
                    "url": "https://api.first.org/data/v1/epss?limit=10000&offset=0"
                },
                {
                    "category": "external",
                    "summary": "Source - github",
                    "url": "https://api.github.com/advisories/GHSA-2xc6-348p-c2x6"
                },
                {
                    "category": "external",
                    "summary": "Source - first",
                    "url": "https://api.first.org/data/v1/epss?limit=10000&offset=0"
                },
                {
                    "category": "external",
                    "summary": "Reference - cveprojectv5; github; nvd",
                    "url": "https://github.com/Sylius/Sylius/security/advisories/GHSA-2xc6-348p-c2x6"
                },
                {
                    "category": "external",
                    "summary": "Reference - github",
                    "url": "https://github.com/advisories/GHSA-2xc6-348p-c2x6"
                },
                {
                    "category": "external",
                    "summary": "Reference - github",
                    "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-31820"
                }
            ],
            "scores": [
                {
                    "cvss_v3": {
                        "version": "3.1",
                        "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N",
                        "baseScore": 6.5,
                        "baseSeverity": "MEDIUM"
                    },
                    "products": [
                        "CSAFPID-5778700",
                        "CSAFPID-5778701",
                        "CSAFPID-5778702"
                    ]
                }
            ],
            "title": "CVE-2026-31820"
        }
    ]
}