{"id":"GHSA-x83g-979r-f5fh","summary":"Sylius Mollie Plugin has unauthenticated IDOR that leaks order token and customer PII","details":"### Impact\nTwo unauthenticated Mollie shop endpoints look up orders by a sequential integer `orderId`\nwith no ownership or session check. Chained, they expose customer PII.\n\n`GET /{_locale}/thank-you` (`PageRedirectController::thankYouAction`, route\n`sylius_mollie_shop_thank_you_page_redirect`) loads the order with `findOneBy(['id' =\u003e $orderId])`\nand returns a `302` whose `Location` header carries that order's `tokenValue`. Any `orderId`\nthus yields that order's token. A non-existent id dereferences null and returns a `500`. The\nhandler also writes the raw `orderId` into the session.\n\n`GET /{_locale}/get-code` (`QrCodeAction::fetchQrCodeFromOrder`, route\n`sylius_mollie_shop_get_qr_code`) runs the same lookup and returns the order's QR code and id\nas JSON, ignoring the session cart; this is where the front-end got the integer id. A bad id\n`500`s here too.\n\nThat `tokenValue` is the order's only access control. Passed to the Sylius core page\n`GET /{_locale}/register-after-checkout/{tokenValue}` it returns a form pre-filled with the\ncustomer's first name, last name and email. The full attack: enumerate `orderId`, read the\ntoken from the redirect, read the PII, at roughly a 1-in-71 hit rate for guest orders.\n`register-after-checkout` is Sylius core, not the plugin, and trusts the token by design, so\nthe leak is what must be fixed.\n\nNone of the plugin endpoints require a login, session or CSRF token.\n\n### Patches\nFixed in **2.2.8**, **3.2.4** and **3.3.1**. \n\n### Workarounds\nIf you cannot upgrade immediately, patch both endpoints at the project level by decorating\nthe plugin controllers. The decorators enforce ownership before delegating to the original\ncontroller, so no plugin behaviour is lost. They keep the original `orderId` request contract,\nso no front-end or asset changes are required. Works on both 2.2 and 3.x.\n\n#### Step 1. Decorate the QR code controller\nCreate `src/Controller/Mollie/SecureQrCodeAction.php` in your Sylius project:\n\n```php\n\u003c?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Controller\\Mollie;\n\nuse Sylius\\Component\\Order\\Context\\CartContextInterface;\nuse Sylius\\Component\\Order\\Context\\CartNotFoundException;\nuse Sylius\\MolliePlugin\\Controller\\Shop\\QrCodeAction;\nuse Symfony\\Component\\HttpFoundation\\JsonResponse;\nuse Symfony\\Component\\HttpFoundation\\Request;\nuse Symfony\\Component\\HttpFoundation\\Response;\n\nfinal class SecureQrCodeAction\n{\n    private const OWNED_ORDER_IDS_SESSION_KEY = 'sylius_mollie.owned_order_ids';\n\n    public function __construct(\n        private readonly QrCodeAction $inner,\n        private readonly CartContextInterface $cartContext,\n    ) {\n    }\n\n    public function fetchQrCodeFromOrder(Request $request): JsonResponse\n    {\n        $orderId = $request-\u003eget('orderId');\n\n        try {\n            $cart = $this-\u003ecartContext-\u003egetCart();\n        } catch (CartNotFoundException) {\n            $cart = null;\n        }\n\n        if (null !== $orderId && (null === $cart || (string) $cart-\u003egetId() !== (string) $orderId)) {\n            return new JsonResponse([], Response::HTTP_FORBIDDEN);\n        }\n\n        if (null !== $cart && null !== $cart-\u003egetId() && $request-\u003ehasSession()) {\n            $session = $request-\u003egetSession();\n            $ownedIds = $session-\u003eget(self::OWNED_ORDER_IDS_SESSION_KEY, []);\n            $ownedIds[(string) $cart-\u003egetId()] = true;\n            $session-\u003eset(self::OWNED_ORDER_IDS_SESSION_KEY, $ownedIds);\n        }\n\n        return $this-\u003einner-\u003efetchQrCodeFromOrder($request);\n    }\n\n    public function createPayment(Request $request): Response\n    {\n        return $this-\u003einner-\u003ecreatePayment($request);\n    }\n\n    public function removeQrCodeFromOrder(Request $request): JsonResponse\n    {\n        return $this-\u003einner-\u003eremoveQrCodeFromOrder($request);\n    }\n}\n```\n\n#### Step 2. Decorate the thank-you controller\nCreate `src/Controller/Mollie/SecurePageRedirectController.php`:\n\n```php\n\u003c?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Controller\\Mollie;\n\nuse Sylius\\MolliePlugin\\Controller\\Shop\\PageRedirectController;\nuse Symfony\\Component\\HttpFoundation\\RedirectResponse;\nuse Symfony\\Component\\HttpFoundation\\Request;\nuse Symfony\\Component\\HttpFoundation\\Session\\SessionInterface;\nuse Symfony\\Component\\Routing\\RouterInterface;\n\nfinal class SecurePageRedirectController\n{\n    private const OWNED_ORDER_IDS_SESSION_KEY = 'sylius_mollie.owned_order_ids';\n\n    public function __construct(\n        private readonly PageRedirectController $inner,\n        private readonly RouterInterface $router,\n    ) {\n    }\n\n    public function thankYouAction(Request $request, SessionInterface $session): RedirectResponse\n    {\n        $orderId = $request-\u003eget('orderId');\n\n        if (null !== $orderId) {\n            $ownedIds = $session-\u003eget(self::OWNED_ORDER_IDS_SESSION_KEY, []);\n\n            if (!isset($ownedIds[(string) $orderId])) {\n                return new RedirectResponse($this-\u003erouter-\u003egenerate('sylius_shop_cart_summary'));\n            }\n        }\n\n        return $this-\u003einner-\u003ethankYouAction($request, $session);\n    }\n}\n```\n\n#### Step 3. Register the decorators\nAppend to your project's `config/services.yaml`:\n\n```yaml\nservices:\n    App\\Controller\\Mollie\\SecureQrCodeAction:\n        decorates: sylius_mollie.controller.shop.qr_code\n        public: true\n        arguments:\n            $inner: '@.inner'\n            $cartContext: '@sylius.context.cart'\n\n    App\\Controller\\Mollie\\SecurePageRedirectController:\n        decorates: sylius_mollie.controller.shop.page_redirect\n        public: true\n        arguments:\n            $inner: '@.inner'\n            $router: '@router'\n```\n\n\u003e Both decorators keep `@.inner` and only add an ownership check on `orderId` before handing\n\u003e the request to the original action, so `createPayment`, `removeQrCodeFromOrder` and the\n\u003e thank-you redirect all keep their original behaviour and the front-end contract is unchanged.\n\n#### Step 4. Clear the cache\n```bash\nbin/console cache:clear\n```","aliases":["CVE-2026-68501"],"modified":"2026-07-31T17:00:11.068442171Z","published":"2026-07-31T16:52:59Z","database_specific":{"cwe_ids":["CWE-639"],"severity":"MODERATE","github_reviewed":true,"github_reviewed_at":"2026-07-31T16:52:59Z","nvd_published_at":"2026-07-30T21:18:13Z"},"references":[{"type":"WEB","url":"https://github.com/Sylius/MolliePlugin/security/advisories/GHSA-x83g-979r-f5fh"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-68501"},{"type":"WEB","url":"https://github.com/Sylius/MolliePlugin/pull/351"},{"type":"WEB","url":"https://github.com/Sylius/MolliePlugin/pull/352"},{"type":"WEB","url":"https://github.com/Sylius/MolliePlugin/pull/354"},{"type":"WEB","url":"https://github.com/Sylius/MolliePlugin/commit/01316b3ad3cf82e3c5ad160115d0a2cf89174e49"},{"type":"WEB","url":"https://github.com/Sylius/MolliePlugin/commit/153c754486b1bc597b67a90ac07ef71cd7958267"},{"type":"WEB","url":"https://github.com/Sylius/MolliePlugin/commit/d1f7753e92106e8bf3bedcfc61b02ea7b8e1c38a"},{"type":"PACKAGE","url":"https://github.com/Sylius/MolliePlugin"},{"type":"WEB","url":"https://github.com/Sylius/MolliePlugin/releases/tag/v2.2.8"},{"type":"WEB","url":"https://github.com/Sylius/MolliePlugin/releases/tag/v3.2.4"},{"type":"WEB","url":"https://github.com/Sylius/MolliePlugin/releases/tag/v3.3.1"}],"affected":[{"package":{"name":"sylius/mollie-plugin","ecosystem":"Packagist","purl":"pkg:composer/sylius/mollie-plugin"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.2.8"}]}],"versions":["v0.1.0","v1.0.0","v1.0.1","v1.0.2","v2.0.0","v2.0.1","v2.0.2","v2.1.0","v2.1.1","v2.2.0","v2.2.1","v2.2.2","v2.2.3","v2.2.4","v2.2.5","v2.2.6","v2.2.7"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/07/GHSA-x83g-979r-f5fh/GHSA-x83g-979r-f5fh.json"}},{"package":{"name":"sylius/mollie-plugin","ecosystem":"Packagist","purl":"pkg:composer/sylius/mollie-plugin"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.0.0"},{"fixed":"3.2.4"}]}],"versions":["v3.0.0","v3.0.1","v3.0.2","v3.0.3","v3.1.0","v3.1.1","v3.1.2","v3.2.0","v3.2.1","v3.2.2","v3.2.3"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/07/GHSA-x83g-979r-f5fh/GHSA-x83g-979r-f5fh.json"}},{"package":{"name":"sylius/mollie-plugin","ecosystem":"Packagist","purl":"pkg:composer/sylius/mollie-plugin"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"3.3.0"},{"fixed":"3.3.1"}]}],"versions":["v3.3.0"],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/07/GHSA-x83g-979r-f5fh/GHSA-x83g-979r-f5fh.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L"}]}