CVE-2026-31819: Sylius/sylius Sylius Has An Open Redirect Vulnerability

MODERATE
Advisory Identifier: GHSA-9ffx-f77r-756w
CWE-601
Published
Advisory Summary

CVE-2026-31819 is a MODERATE sylius has an open redirect vulnerability (CWE-601: URL Redirection to Untrusted Site ('Open Redirect')) affecting Sylius/sylius libraries in the Packagist ecosystem. The issue involves sylius has an open redirect via referer header. Remediation is available by upgrading affected packages to version 1.9.12, 1.10.16, 1.11.17, 1.12.23, 1.13.15, 1.14.18, 2.0.16, 2.1.12, 2.2.3.

CVE-2026-31819 at a Glance

CVE Identifier CVE-2026-31819
GHSA Identifier GHSA-9ffx-f77r-756w
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-601: URL Redirection to Untrusted Site ('Open Redirect')
Affected Product Sylius/sylius
Package Ecosystem Packagist
Published Date
Last Updated

How to Fix CVE-2026-31819

To remediate this vulnerability, upgrade all affected Sylius/sylius dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

sylius/sylius fixed: 1.9.12
Upgrade sylius/sylius to 1.9.12
sylius/sylius fixed: 1.10.16
Upgrade sylius/sylius to 1.10.16
sylius/sylius fixed: 1.11.17
Upgrade sylius/sylius to 1.11.17
sylius/sylius fixed: 1.12.23
Upgrade sylius/sylius to 1.12.23
sylius/sylius fixed: 1.13.15
Upgrade sylius/sylius to 1.13.15
sylius/sylius fixed: 1.14.18
Upgrade sylius/sylius to 1.14.18
sylius/sylius fixed: 2.0.16
Upgrade sylius/sylius to 2.0.16
sylius/sylius fixed: 2.1.12
Upgrade sylius/sylius to 2.1.12
sylius/sylius fixed: 2.2.3
Upgrade sylius/sylius to 2.2.3
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for sylius/sylius

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-31819, inspect your project dependencies for Sylius/sylius:

inspect dependencies for sylius/sylius

Analyze the terminal output to locate any version of Sylius/sylius in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.9.12), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-601: URL Redirection to Untrusted Site ('Open Redirect'), where the web application accepts a user-controlled input that specifies a link to an external site, and uses that link in a redirect. In Sylius/sylius, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact `CurrencySwitchController::switchAction()`, `ImpersonateUserController::impersonateAction()` and `StorageBasedLocaleSwitcher::handle()` use the HTTP Referer header directly when redirecting. The attack requires the victim to click a legitimate application link placed on an attacker-controlled page. The browser automatically sends the attacker's site as the Referer, and the application redirects back to it. This can be used for phishing or credential theft, as the redirect originates from a trusted domain. The severity varies by endpoint; public endpoints require no authentication and are trivially exploitable, while admin-only endpoints require an authenticated session but remain vulnerable if an admin follows a link from an external source such as email or chat. Affected classes: - `CurrencySwitchController::switchAction()` - public - `StorageBasedLocaleSwitcher::handle()` - public, used in locale switching without having locale in the `url` - `ImpersonateUserController::impersonateAction()` - admin-only ### Patches The issue is fixed in versions: 1.9.12, 1.10.16, 1.11.17, 1.12.23, 1.13.15, 1.14.18, 2.0.16, 2.1.12, 2.2.3 and above. ### Workarounds If you cannot update Sylius immediately, copy the affected classes from vendor to your project's `src/` directory, apply the fix, and override the service definitions. #### Step 1 - CurrencySwitchController Copy from `vendor/sylius/sylius/src/Sylius/Bundle/ShopBundle/Controller/CurrencySwitchController.php` to `src/Controller/CurrencySwitchController.php` and apply the following changes: ```diff -namespace Sylius\Bundle\ShopBundle\Controller; +namespace App\Controller; use Sylius\Component\Channel\Context\ChannelContextInterface; use Sylius\Component\Core\Currency\CurrencyStorageInterface; use Sylius\Component\Core\Model\ChannelInterface; use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\Routing\RouterInterface; final class CurrencySwitchController { public function __construct( private Environment $templatingEngine, // for 1.x version private CurrencyStorageInterface $currencyStorage, private ChannelContextInterface $channelContext, + private RouterInterface $router, ) { } public function switchAction(Request $request, string $code): Response { /** @var ChannelInterface $channel */ $channel = $this->channelContext->getChannel(); $this->currencyStorage->set($channel, $code); - return new RedirectResponse($request->headers->get('referer', $request->getSchemeAndHttpHost())); + return new RedirectResponse($this->router->generate('sylius_shop_homepage')); } } ``` #### Step 2 - ImpersonateUserController Copy from `vendor/sylius/sylius/src/Sylius/Bundle/AdminBundle/Controller/ImpersonateUserController.php` to `src/Controller/Admin/ImpersonateUserController.php` and apply the following changes: ```diff -namespace Sylius\Bundle\AdminBundle\Controller; +namespace App\Controller\Admin; // ... (keep all existing use statements) public function impersonateAction(Request $request, string $username): Response { // ... (keep authorization check and impersonation logic) $this->addFlash($request, $username); - $redirectUrl = $request->headers->get( - 'referer', + return new RedirectResponse( $this->router->generate('sylius_admin_customer_show', ['id' => $user->getId()]) ); - - return new RedirectResponse($redirectUrl); } ``` #### Step 3 - StorageBasedLocaleSwitcher (only if you use `locale_switcher: storage`) > **Note:** Skip this step if you use the default `locale_switcher: url` mode. Copy from `vendor/sylius/sylius/src/Sylius/Bundle/ShopBundle/Locale/StorageBasedLocaleSwitcher.php` to `src/Locale/StorageBasedLocaleSwitcher.php` and apply the following changes: **For Sylius 1.9 – 2.1.2:** ```diff -namespace Sylius\Bundle\ShopBundle\Locale; +namespace App\Locale; use Sylius\Bundle\ShopBundle\Locale\LocaleSwitcherInterface; use Sylius\Component\Channel\Context\ChannelContextInterface; use Sylius\Component\Core\Locale\LocaleStorageInterface; use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\Routing\RouterInterface; final class StorageBasedLocaleSwitcher implements LocaleSwitcherInterface { public function __construct( private LocaleStorageInterface $localeStorage, private ChannelContextInterface $channelContext, + private RouterInterface $router, ) { } public function handle(Request $request, string $localeCode): RedirectResponse { $this->localeStorage->set($this->channelContext->getChannel(), $localeCode); - return new RedirectResponse($request->headers->get('referer', $request->getSchemeAndHttpHost())); + return new RedirectResponse($this->router->generate('sylius_shop_homepage')); } } ``` **For Sylius 2.1.3 and later:** > In Sylius 2.1.3 the class was refactored to use `UrlMatcherInterface`. While this adds partial validation, it still passes the full referer URL to `RedirectResponse`, so the open redirect remains exploitable. ```diff -namespace Sylius\Bundle\ShopBundle\Locale; +namespace App\Locale; use Sylius\Bundle\ShopBundle\Locale\LocaleSwitcherInterface; use Sylius\Component\Channel\Context\ChannelContextInterface; use Sylius\Component\Core\Locale\LocaleStorageInterface; use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\Routing\Exception\ResourceNotFoundException; -use Symfony\Component\Routing\Matcher\UrlMatcherInterface; +use Symfony\Component\Routing\RouterInterface; final class StorageBasedLocaleSwitcher implements LocaleSwitcherInterface { public function __construct( private LocaleStorageInterface $localeStorage, private ChannelContextInterface $channelContext, - private ?UrlMatcherInterface $urlMatcher = null, + private RouterInterface $router, ) { - if (null === $this->urlMatcher) { - trigger_deprecation( - 'sylius/shop-bundle', - '2.1', - 'Not passing a "%s" to "%s" is deprecated and will be required in Sylius 3.0.', - UrlMatcherInterface::class, - self::class, - ); - } } public function handle(Request $request, string $localeCode): RedirectResponse { $this->localeStorage->set($this->channelContext->getChannel(), $localeCode); - $url = $request->headers->get('referer', $request->getSchemeAndHttpHost()); - - if ($this->urlMatcher) { - try { - $this->urlMatcher->match($url); - } catch (ResourceNotFoundException) { - return new RedirectResponse($request->getSchemeAndHttpHost()); - } - } - - return new RedirectResponse($url); + return new RedirectResponse($this->router->generate('sylius_shop_homepage')); } } ``` #### Step 4 - Override the services Add to `config/services.yaml`. **Sylius 1.x (1.9 – 1.14):** ```yaml services: # ... your existing services ... sylius.controller.shop.currency_switch: class: App\Controller\CurrencySwitchController public: true arguments: $templatingEngine: '@twig' $currencyStorage: '@sylius.storage.currency' $channelContext: '@sylius.context.channel' $router: '@router' sylius.controller.shop.impersonate_user: class: App\Controller\Admin\ImpersonateUserController public: true arguments: $impersonator: '@sylius.admin.security.user_impersonator' $authorizationChecker: '@security.authorization_checker' $userProvider: '@sylius.admin_user_provider.email_or_name_based' $router: '@router' $authorizationRole: 'ROLE_ADMINISTRATION_ACCESS' # Only if you use locale_switcher: storage sylius.shop.locale_switcher: class: App\Locale\StorageBasedLocaleSwitcher public: false arguments: $localeStorage: '@sylius.storage.locale' $channelContext: '@sylius.context.channel' $router: '@router' ``` **Sylius 2.x (2.0 – 2.1):** ```yaml services: # ... your existing services ... sylius_shop.controller.currency_switch: class: App\Controller\CurrencySwitchController public: true arguments: $currencyStorage: '@sylius.storage.currency' $channelContext: '@sylius.context.channel' $router: '@router' sylius_admin.controller.impersonate_user: class: App\Controller\Admin\ImpersonateUserController public: true arguments: $impersonator: '@sylius_admin.security.shop_user_impersonator' $authorizationChecker: '@security.authorization_checker' $userProvider: '@sylius.shop_user_provider.email_or_name_based' $router: '@router' $authorizationRole: 'ROLE_ADMINISTRATION_ACCESS' # Only if you use locale_switcher: storage sylius_shop.locale_switcher: class: App\Locale\StorageBasedLocaleSwitcher public: false arguments: $localeStorage: '@sylius.storage.locale' $channelContext: '@sylius.context.channel' $router: '@router' ``` #### Step 5 - Clear cache ```bash bin/console cache:clear ``` --- #### Customizing the redirect target If you need a different redirect target, override the route definition with the `_sylius.redirect` attribute: ```yaml # config/routes/sylius_shop.yaml (AFTER the sylius_shop resource import) sylius_shop_switch_currency: path: /{_locale}/switch-currency/{code} methods: [GET] defaults: _controller: sylius.controller.shop.currency_switch:switchAction _sylius: redirect: sylius_shop_product_index # or any route name ``` ### Reporters We would like to extend our gratitude to the following individuals for their detailed reporting and responsible disclosure of this vulnerability: - Bartłomiej Nowiński (@bnBart) ### For more information If you have any questions or comments about this advisory: - Open an issue in [Sylius issues](https://github.com/Sylius/Sylius/issues?q=sort%3Aupdated-desc+is%3Aissue+is%3Aopen) - Email us at [security@sylius.com](mailto:security@sylius.com)

CVE-2026-31819 Affected Sylius/sylius Versions

9 component(s)
Fixed Versions:
1.9.121.10.161.11.171.12.231.13.151.14.182.0.162.1.122.2.3
Product / Package Ecosystem Affected Versions Fixed Version
sylius/sylius
Packagist
< 1.9.12
1.9.12
sylius/sylius
Packagist
≥ 1.10.0
< 1.10.16
1.10.16
sylius/sylius
Packagist
≥ 1.11.0
< 1.11.17
1.11.17
sylius/sylius
Packagist
≥ 1.12.0
< 1.12.23
1.12.23
sylius/sylius
Packagist
≥ 1.13.0
< 1.13.15
1.13.15
sylius/sylius
Packagist
≥ 1.14.0
< 1.14.18
1.14.18
sylius/sylius
Packagist
≥ 2.0.0
< 2.0.16
2.0.16
sylius/sylius
Packagist
≥ 2.1.0
< 2.1.12
2.1.12
sylius/sylius
Packagist
≥ 2.2.0
< 2.2.3
2.2.3

References

Frequently Asked Questions

What is CVE-2026-31819?
CVE-2026-31819 is a security vulnerability in Sylius/sylius involving Sylius has an Open Redirect via Referer Header under CWE-601: URL Redirection to Untrusted Site ('Open Redirect').
Which Sylius/sylius versions are affected?
Affected versions include releases prior to 1.9.12, 1.10.16, 1.11.17, 1.12.23, 1.13.15, 1.14.18, 2.0.16, 2.1.12, 2.2.3 across affected packages: sylius/sylius.
What version fixes CVE-2026-31819?
Upgrading to 1.9.12, 1.10.16, 1.11.17, 1.12.23, 1.13.15, 1.14.18, 2.0.16, 2.1.12, 2.2.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is sylius/sylius affected?
Yes, sylius/sylius is affected in releases prior to 1.9.12, 1.10.16, 1.11.17, 1.12.23, 1.13.15, 1.14.18, 2.0.16, 2.1.12, 2.2.3. Upgrade your dependency to 1.9.12, 1.10.16, 1.11.17, 1.12.23, 1.13.15, 1.14.18, 2.0.16, 2.1.12, 2.2.3 or later.
What CWE is associated with CVE-2026-31819?
CVE-2026-31819 is classified under CWE-601: URL Redirection to Untrusted Site ('Open Redirect') (The web application accepts a user-controlled input that specifies a link to an external site, and uses that link in a redirect.).
How can I check Packagist dependencies for CVE-2026-31819?
Run the dependency tree command: 'inspect dependencies for sylius/sylius'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-9ffx-f77r-756w",
  "modified" : "2026-03-11T20:32:25Z",
  "published" : "2026-03-11T00:12:29Z",
  "aliases" : [ "CVE-2026-31819" ],
  "summary" : "Sylius has an Open Redirect via Referer Header",
  "details" : "### Impact\n`CurrencySwitchController::switchAction()`, `ImpersonateUserController::impersonateAction()` and `StorageBasedLocaleSwitcher::handle()` use the HTTP Referer header directly when redirecting.\n\nThe attack requires the victim to click a legitimate application link placed on an attacker-controlled page. The browser automatically sends the attacker's site as the Referer, and the application redirects back to it. This can be used for phishing or credential theft, as the redirect originates from a trusted domain.\n\nThe severity varies by endpoint; public endpoints require no authentication and are trivially exploitable, while admin-only endpoints require an authenticated session but remain vulnerable if an admin follows a link from an external source such as email or chat.\n\nAffected classes:\n- `CurrencySwitchController::switchAction()` - public\n- `StorageBasedLocaleSwitcher::handle()` - public, used in locale switching without having locale in the `url`\n- `ImpersonateUserController::impersonateAction()` - admin-only\n\n### Patches\nThe issue is fixed in versions: 1.9.12, 1.10.16, 1.11.17, 1.12.23, 1.13.15, 1.14.18, 2.0.16, 2.1.12, 2.2.3 and above.\n\n### Workarounds\nIf you cannot update Sylius immediately, copy the affected classes from vendor to your project's `src/` directory, apply the fix, and override the service definitions.\n\n#### Step 1 - CurrencySwitchController\n\nCopy from `vendor/sylius/sylius/src/Sylius/Bundle/ShopBundle/Controller/CurrencySwitchController.php` to `src/Controller/CurrencySwitchController.php` and apply the following changes:\n\n```diff\n-namespace Sylius\\Bundle\\ShopBundle\\Controller;\n+namespace App\\Controller;\n\n use Sylius\\Component\\Channel\\Context\\ChannelContextInterface;\n use Sylius\\Component\\Core\\Currency\\CurrencyStorageInterface;\n use Sylius\\Component\\Core\\Model\\ChannelInterface;\n use Symfony\\Component\\HttpFoundation\\RedirectResponse;\n use Symfony\\Component\\HttpFoundation\\Request;\n use Symfony\\Component\\HttpFoundation\\Response;\n+use Symfony\\Component\\Routing\\RouterInterface;\n\n final class CurrencySwitchController\n {\n     public function __construct(\n         private Environment $templatingEngine, // for 1.x version\n         private CurrencyStorageInterface $currencyStorage,\n         private ChannelContextInterface $channelContext,\n+        private RouterInterface $router,\n     ) {\n     }\n\n     public function switchAction(Request $request, string $code): Response\n     {\n         /** @var ChannelInterface $channel */\n         $channel = $this->channelContext->getChannel();\n\n         $this->currencyStorage->set($channel, $code);\n\n-        return new RedirectResponse($request->headers->get('referer', $request->getSchemeAndHttpHost()));\n+        return new RedirectResponse($this->router->generate('sylius_shop_homepage'));\n     }\n }\n```\n\n#### Step 2 - ImpersonateUserController\n\nCopy from `vendor/sylius/sylius/src/Sylius/Bundle/AdminBundle/Controller/ImpersonateUserController.php` to `src/Controller/Admin/ImpersonateUserController.php` and apply the following changes:\n\n```diff\n-namespace Sylius\\Bundle\\AdminBundle\\Controller;\n+namespace App\\Controller\\Admin;\n\n // ... (keep all existing use statements)\n\n     public function impersonateAction(Request $request, string $username): Response\n     {\n         // ... (keep authorization check and impersonation logic)\n\n         $this->addFlash($request, $username);\n\n-        $redirectUrl = $request->headers->get(\n-            'referer',\n+        return new RedirectResponse(\n             $this->router->generate('sylius_admin_customer_show', ['id' => $user->getId()])\n         );\n-\n-        return new RedirectResponse($redirectUrl);\n     }\n```\n\n#### Step 3 - StorageBasedLocaleSwitcher (only if you use `locale_switcher: storage`)\n\n> **Note:** Skip this step if you use the default `locale_switcher: url` mode.\n\nCopy from `vendor/sylius/sylius/src/Sylius/Bundle/ShopBundle/Locale/StorageBasedLocaleSwitcher.php` to `src/Locale/StorageBasedLocaleSwitcher.php` and apply the following changes:\n\n**For Sylius 1.9 – 2.1.2:**\n\n```diff\n-namespace Sylius\\Bundle\\ShopBundle\\Locale;\n+namespace App\\Locale;\n\n use Sylius\\Bundle\\ShopBundle\\Locale\\LocaleSwitcherInterface;\n use Sylius\\Component\\Channel\\Context\\ChannelContextInterface;\n use Sylius\\Component\\Core\\Locale\\LocaleStorageInterface;\n use Symfony\\Component\\HttpFoundation\\RedirectResponse;\n use Symfony\\Component\\HttpFoundation\\Request;\n+use Symfony\\Component\\Routing\\RouterInterface;\n\n final class StorageBasedLocaleSwitcher implements LocaleSwitcherInterface\n {\n     public function __construct(\n         private LocaleStorageInterface $localeStorage,\n         private ChannelContextInterface $channelContext,\n+        private RouterInterface $router,\n     ) {\n     }\n\n     public function handle(Request $request, string $localeCode): RedirectResponse\n     {\n         $this->localeStorage->set($this->channelContext->getChannel(), $localeCode);\n\n-        return new RedirectResponse($request->headers->get('referer', $request->getSchemeAndHttpHost()));\n+        return new RedirectResponse($this->router->generate('sylius_shop_homepage'));\n     }\n }\n```\n\n**For Sylius 2.1.3 and later:**\n\n> In Sylius 2.1.3 the class was refactored to use `UrlMatcherInterface`. While this adds partial validation, it still passes the full referer URL to `RedirectResponse`, so the open redirect remains exploitable.\n\n```diff\n-namespace Sylius\\Bundle\\ShopBundle\\Locale;\n+namespace App\\Locale;\n\n use Sylius\\Bundle\\ShopBundle\\Locale\\LocaleSwitcherInterface;\n use Sylius\\Component\\Channel\\Context\\ChannelContextInterface;\n use Sylius\\Component\\Core\\Locale\\LocaleStorageInterface;\n use Symfony\\Component\\HttpFoundation\\RedirectResponse;\n use Symfony\\Component\\HttpFoundation\\Request;\n-use Symfony\\Component\\Routing\\Exception\\ResourceNotFoundException;\n-use Symfony\\Component\\Routing\\Matcher\\UrlMatcherInterface;\n+use Symfony\\Component\\Routing\\RouterInterface;\n\n final class StorageBasedLocaleSwitcher implements LocaleSwitcherInterface\n {\n     public function __construct(\n         private LocaleStorageInterface $localeStorage,\n         private ChannelContextInterface $channelContext,\n-        private ?UrlMatcherInterface $urlMatcher = null,\n+        private RouterInterface $router,\n     ) {\n-        if (null === $this->urlMatcher) {\n-            trigger_deprecation(\n-                'sylius/shop-bundle',\n-                '2.1',\n-                'Not passing a \"%s\" to \"%s\" is deprecated and will be required in Sylius 3.0.',\n-                UrlMatcherInterface::class,\n-                self::class,\n-            );\n-        }\n     }\n\n     public function handle(Request $request, string $localeCode): RedirectResponse\n     {\n         $this->localeStorage->set($this->channelContext->getChannel(), $localeCode);\n-        $url = $request->headers->get('referer', $request->getSchemeAndHttpHost());\n-\n-        if ($this->urlMatcher) {\n-            try {\n-                $this->urlMatcher->match($url);\n-            } catch (ResourceNotFoundException) {\n-                return new RedirectResponse($request->getSchemeAndHttpHost());\n-            }\n-        }\n-\n-        return new RedirectResponse($url);\n+        return new RedirectResponse($this->router->generate('sylius_shop_homepage'));\n     }\n }\n```\n\n#### Step 4 - Override the services\n\nAdd to `config/services.yaml`.\n\n**Sylius 1.x (1.9 – 1.14):**\n\n```yaml\nservices:\n    # ... your existing services ...\n\n    sylius.controller.shop.currency_switch:\n        class: App\\Controller\\CurrencySwitchController\n        public: true\n        arguments:\n            $templatingEngine: '@twig'\n            $currencyStorage: '@sylius.storage.currency'\n            $channelContext: '@sylius.context.channel'\n            $router: '@router'\n\n    sylius.controller.shop.impersonate_user:\n        class: App\\Controller\\Admin\\ImpersonateUserController\n        public: true\n        arguments:\n            $impersonator: '@sylius.admin.security.user_impersonator'\n            $authorizationChecker: '@security.authorization_checker'\n            $userProvider: '@sylius.admin_user_provider.email_or_name_based'\n            $router: '@router'\n            $authorizationRole: 'ROLE_ADMINISTRATION_ACCESS'\n\n    # Only if you use locale_switcher: storage\n    sylius.shop.locale_switcher:\n        class: App\\Locale\\StorageBasedLocaleSwitcher\n        public: false\n        arguments:\n            $localeStorage: '@sylius.storage.locale'\n            $channelContext: '@sylius.context.channel'\n            $router: '@router'\n```\n\n**Sylius 2.x (2.0 – 2.1):**\n\n```yaml\nservices:\n    # ... your existing services ...\n\n    sylius_shop.controller.currency_switch:\n        class: App\\Controller\\CurrencySwitchController\n        public: true\n        arguments:\n            $currencyStorage: '@sylius.storage.currency'\n            $channelContext: '@sylius.context.channel'\n            $router: '@router'\n\n    sylius_admin.controller.impersonate_user:\n        class: App\\Controller\\Admin\\ImpersonateUserController\n        public: true\n        arguments:\n            $impersonator: '@sylius_admin.security.shop_user_impersonator'\n            $authorizationChecker: '@security.authorization_checker'\n            $userProvider: '@sylius.shop_user_provider.email_or_name_based'\n            $router: '@router'\n            $authorizationRole: 'ROLE_ADMINISTRATION_ACCESS'\n\n    # Only if you use locale_switcher: storage\n    sylius_shop.locale_switcher:\n        class: App\\Locale\\StorageBasedLocaleSwitcher\n        public: false\n        arguments:\n            $localeStorage: '@sylius.storage.locale'\n            $channelContext: '@sylius.context.channel'\n            $router: '@router'\n```\n\n#### Step 5 - Clear cache\n\n```bash\nbin/console cache:clear\n```\n\n---\n\n#### Customizing the redirect target\n\nIf you need a different redirect target, override the route definition with the `_sylius.redirect` attribute:\n\n```yaml\n# config/routes/sylius_shop.yaml (AFTER the sylius_shop resource import)\nsylius_shop_switch_currency:\n    path: /{_locale}/switch-currency/{code}\n    methods: [GET]\n    defaults:\n        _controller: sylius.controller.shop.currency_switch:switchAction\n        _sylius:\n            redirect: sylius_shop_product_index  # or any route name\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- Bartłomiej Nowiński (@bnBart)\n\n### For more information\n\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)",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:L/SI:L/SA:L"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "sylius/sylius"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.9.12"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 1.9.11"
    }
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "sylius/sylius"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.10.0"
      }, {
        "fixed" : "1.10.16"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 1.10.15"
    }
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "sylius/sylius"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.11.0"
      }, {
        "fixed" : "1.11.17"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 1.11.16"
    }
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "sylius/sylius"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.12.0"
      }, {
        "fixed" : "1.12.23"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 1.12.22"
    }
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "sylius/sylius"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.13.0"
      }, {
        "fixed" : "1.13.15"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 1.13.14"
    }
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "sylius/sylius"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.14.0"
      }, {
        "fixed" : "1.14.18"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 1.14.17"
    }
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "sylius/sylius"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.0.0"
      }, {
        "fixed" : "2.0.16"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 2.0.15"
    }
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "sylius/sylius"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.1.0"
      }, {
        "fixed" : "2.1.12"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 2.1.11"
    }
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "sylius/sylius"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.2.0"
      }, {
        "fixed" : "2.2.3"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 2.2.2"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/Sylius/Sylius/security/advisories/GHSA-9ffx-f77r-756w"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-31819"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/Sylius/Sylius"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-601" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-03-11T00:12:29Z",
    "nvd_published_at" : "2026-03-10T22:16:19Z"
  }
}