CVE-2026-53638: Sylius Channel-based Payment Method Restriction Bypass Vulnerability

MODERATE
Advisory Identifier: GHSA-6955-hrm5-c4qp
CVSS 4.3
CWE-863
Published
Advisory Summary

CVE-2026-53638 is a MODERATE (CVSS 4.3) channel-based payment method restriction bypass vulnerability (CWE-863: Incorrect Authorization) affecting Sylius libraries in the Packagist ecosystem. The issue involves channel-based payment method restriction bypass on shop account orders api endpoint. Remediation is available by upgrading affected packages to version 2.0.18, 2.1.15, 2.2.6.

CVE-2026-53638 at a Glance

CVE Identifier CVE-2026-53638
GHSA Identifier GHSA-6955-hrm5-c4qp
Severity MODERATE
CVSS v3.1 Base Score 4.3
CWE Classification CWE-863: Incorrect Authorization
Affected Product Sylius
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 4.3

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality None (C:N)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2026-53638

To remediate this vulnerability, upgrade all affected 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: 2.0.18
Upgrade sylius/sylius to 2.0.18
sylius/sylius fixed: 2.1.15
Upgrade sylius/sylius to 2.1.15
sylius/sylius fixed: 2.2.6
Upgrade sylius/sylius to 2.2.6
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-53638, inspect your project dependencies for Sylius:

inspect dependencies for sylius/sylius

Analyze the terminal output to locate any version of Sylius in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.0.18), 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-863: Incorrect Authorization, where the product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check. In 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 An authorization bypass vulnerability exists in the shop account API. The `PATCH /api/v2/shop/account/orders/{tokenValue}/payments/{paymentId}` endpoint, used by an authenticated shop customer to change the payment method of an order that has been placed but not yet paid (state `STATE_NEW`), does not validate that the chosen payment method is enabled for the order's channel. The equivalent checkout endpoint (`PATCH /api/v2/shop/orders/{tokenValue}/payments/{paymentId}`) correctly rejects out-of-channel payment methods with `HTTP 422`; the account endpoint silently accepts them and returns `HTTP 200`. An authenticated customer can therefore assign any globally enabled payment method to their own placed order, including methods that the store operator has explicitly excluded from that channel. ### Patches The issue is fixed in versions: 2.0.18, 2.1.15, 2.2.6 and above. ### Workarounds If users cannot bump Sylius right now, decorate the `Sylius\Bundle\ApiBundle\Changer\PaymentMethodChangerInterface` service in their applications. #### Step 1. Create the decorator `src/Decorator/ChannelCheckingPaymentMethodChanger.php`: ```php <?php declare(strict_types=1); namespace App\Decorator; use ApiPlatform\Validator\Exception\ValidationException; use Sylius\Bundle\ApiBundle\Changer\PaymentMethodChangerInterface; use Sylius\Component\Core\Model\OrderInterface; use Sylius\Component\Core\Model\PaymentMethodInterface; use Sylius\Component\Core\Repository\PaymentMethodRepositoryInterface; use Sylius\Component\Core\Repository\PaymentRepositoryInterface; use Sylius\Component\Payment\Resolver\PaymentMethodsResolverInterface; use Symfony\Component\Validator\ConstraintViolation; use Symfony\Component\Validator\ConstraintViolationList; use Symfony\Contracts\Translation\TranslatorInterface; final readonly class ChannelCheckingPaymentMethodChanger implements PaymentMethodChangerInterface { public function __construct( private PaymentMethodChangerInterface $decorated, private PaymentRepositoryInterface $paymentRepository, private PaymentMethodRepositoryInterface $paymentMethodRepository, private PaymentMethodsResolverInterface $paymentMethodsResolver, private TranslatorInterface $translator, ) { } public function changePaymentMethod(string $paymentMethodCode, mixed $paymentId, OrderInterface $order): OrderInterface { /** @var PaymentMethodInterface|null $paymentMethod */ $paymentMethod = $this->paymentMethodRepository->findOneBy(['code' => $paymentMethodCode]); $payment = $this->paymentRepository->findOneByOrderId($paymentId, $order->getId()); if ( $paymentMethod !== null && $payment !== null && !in_array($paymentMethod, $this->paymentMethodsResolver->getSupportedMethods($payment), true) ) { $template = 'sylius.payment_method.not_available'; $parameters = ['%name%' => (string) $paymentMethod->getName()]; throw new ValidationException(new ConstraintViolationList([ new ConstraintViolation( message: $this->translator->trans($template, $parameters, 'validators'), messageTemplate: $template, parameters: $parameters, root: $paymentMethodCode, propertyPath: '', invalidValue: $paymentMethodCode, ), ])); } return $this->decorated->changePaymentMethod($paymentMethodCode, $paymentId, $order); } } ``` #### Step 2. Register the decorator `config/services.yaml` (append to the application's existing `services:` block): ```yaml services: App\Decorator\ChannelCheckingPaymentMethodChanger: decorates: sylius_api.changer.payment_method arguments: - '@.inner' - '@sylius.repository.payment' - '@sylius.repository.payment_method' - '@sylius.resolver.payment_methods' - '@translator' ``` `@.inner` references the original `PaymentMethodChangerInterface` implementation, so any future Sylius change to the changer keeps working through the decorator. #### Step 3. Clear the cache ```bash bin/console cache:clear ``` ### Reporters We would like to extend our gratitude to the following individuals for their detailed reporting and responsible disclosure of this vulnerability: - Fredrik Dietrichson (@FredrikEV) ### For more information If there are 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) - Send an email to [security@sylius.com](mailto:security@sylius.com)

CVE-2026-53638 Affected Sylius Versions

3 component(s)
Fixed Versions:
2.0.182.1.152.2.6
Product / Package Ecosystem Affected Versions Fixed Version
sylius/sylius
Packagist
≥ 2.0.0
< 2.0.18
2.0.18
sylius/sylius
Packagist
≥ 2.1.0
< 2.1.15
2.1.15
sylius/sylius
Packagist
≥ 2.2.0
< 2.2.6
2.2.6

References

Frequently Asked Questions

What is CVE-2026-53638?
CVE-2026-53638 is a security vulnerability in Sylius involving Channel-based payment method restriction bypass on shop account orders API endpoint under CWE-863: Incorrect Authorization.
Which Sylius versions are affected?
Affected versions include releases prior to 2.0.18, 2.1.15, 2.2.6 across affected packages: sylius/sylius.
What version fixes CVE-2026-53638?
Upgrading to 2.0.18, 2.1.15, 2.2.6 (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 2.0.18, 2.1.15, 2.2.6. Upgrade your dependency to 2.0.18, 2.1.15, 2.2.6 or later.
What is the CVSS score of CVE-2026-53638?
CVE-2026-53638 has a CVSS v3.1 base score of 4.3 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N.
What CWE is associated with CVE-2026-53638?
CVE-2026-53638 is classified under CWE-863: Incorrect Authorization (The product performs an authorization check when an actor attempts to access a resource or perform an action, but it does not correctly perform the check.).
How can I check Packagist dependencies for CVE-2026-53638?
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-6955-hrm5-c4qp",
  "modified" : "2026-07-09T21:03:46Z",
  "published" : "2026-07-09T21:03:46Z",
  "aliases" : [ "CVE-2026-53638" ],
  "summary" : "Sylius: Channel-based payment method restriction bypass on shop account orders API endpoint",
  "details" : "### Impact\nAn authorization bypass vulnerability exists in the shop account API. The `PATCH /api/v2/shop/account/orders/{tokenValue}/payments/{paymentId}` endpoint, used by an authenticated shop customer to change the payment method of an order that has been placed but not yet paid (state `STATE_NEW`), does not validate that the chosen payment method is enabled for the order's channel. The equivalent checkout endpoint (`PATCH /api/v2/shop/orders/{tokenValue}/payments/{paymentId}`) correctly rejects out-of-channel payment methods with `HTTP 422`; the account endpoint silently accepts them and returns `HTTP 200`.\n\nAn authenticated customer can therefore assign any globally enabled payment method to their own placed order, including methods that the store operator has explicitly excluded from that channel. \n\n### Patches\nThe issue is fixed in versions: 2.0.18, 2.1.15, 2.2.6 and above.\n\n### Workarounds\nIf users cannot bump Sylius right now, decorate the `Sylius\\Bundle\\ApiBundle\\Changer\\PaymentMethodChangerInterface` service in their applications. \n\n#### Step 1. Create the decorator\n\n`src/Decorator/ChannelCheckingPaymentMethodChanger.php`:\n\n```php\n<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Decorator;\n\nuse ApiPlatform\\Validator\\Exception\\ValidationException;\nuse Sylius\\Bundle\\ApiBundle\\Changer\\PaymentMethodChangerInterface;\nuse Sylius\\Component\\Core\\Model\\OrderInterface;\nuse Sylius\\Component\\Core\\Model\\PaymentMethodInterface;\nuse Sylius\\Component\\Core\\Repository\\PaymentMethodRepositoryInterface;\nuse Sylius\\Component\\Core\\Repository\\PaymentRepositoryInterface;\nuse Sylius\\Component\\Payment\\Resolver\\PaymentMethodsResolverInterface;\nuse Symfony\\Component\\Validator\\ConstraintViolation;\nuse Symfony\\Component\\Validator\\ConstraintViolationList;\nuse Symfony\\Contracts\\Translation\\TranslatorInterface;\n\nfinal readonly class ChannelCheckingPaymentMethodChanger implements PaymentMethodChangerInterface\n{\n    public function __construct(\n        private PaymentMethodChangerInterface $decorated,\n        private PaymentRepositoryInterface $paymentRepository,\n        private PaymentMethodRepositoryInterface $paymentMethodRepository,\n        private PaymentMethodsResolverInterface $paymentMethodsResolver,\n        private TranslatorInterface $translator,\n    ) {\n    }\n\n    public function changePaymentMethod(string $paymentMethodCode, mixed $paymentId, OrderInterface $order): OrderInterface\n    {\n        /** @var PaymentMethodInterface|null $paymentMethod */\n        $paymentMethod = $this->paymentMethodRepository->findOneBy(['code' => $paymentMethodCode]);\n        $payment = $this->paymentRepository->findOneByOrderId($paymentId, $order->getId());\n\n        if (\n            $paymentMethod !== null\n            && $payment !== null\n            && !in_array($paymentMethod, $this->paymentMethodsResolver->getSupportedMethods($payment), true)\n        ) {\n            $template = 'sylius.payment_method.not_available';\n            $parameters = ['%name%' => (string) $paymentMethod->getName()];\n\n            throw new ValidationException(new ConstraintViolationList([\n                new ConstraintViolation(\n                    message: $this->translator->trans($template, $parameters, 'validators'),\n                    messageTemplate: $template,\n                    parameters: $parameters,\n                    root: $paymentMethodCode,\n                    propertyPath: '',\n                    invalidValue: $paymentMethodCode,\n                ),\n            ]));\n        }\n\n        return $this->decorated->changePaymentMethod($paymentMethodCode, $paymentId, $order);\n    }\n}\n```\n\n#### Step 2. Register the decorator\n\n`config/services.yaml` (append to the application's existing `services:` block):\n\n```yaml\nservices:\n    App\\Decorator\\ChannelCheckingPaymentMethodChanger:\n        decorates: sylius_api.changer.payment_method\n        arguments:\n            - '@.inner'\n            - '@sylius.repository.payment'\n            - '@sylius.repository.payment_method'\n            - '@sylius.resolver.payment_methods'\n            - '@translator'\n```\n\n`@.inner` references the original `PaymentMethodChangerInterface` implementation, so any future Sylius change to the changer keeps working through the decorator.\n\n#### Step 3. Clear the cache\n\n```bash\nbin/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- Fredrik Dietrichson (@FredrikEV)\n\n### For more information\n\nIf there are 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- Send an email to [security@sylius.com](mailto:security@sylius.com)",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "sylius/sylius"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.0.0"
      }, {
        "fixed" : "2.0.18"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "sylius/sylius"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.1.0"
      }, {
        "fixed" : "2.1.15"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "sylius/sylius"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.2.0"
      }, {
        "fixed" : "2.2.6"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/Sylius/Sylius/security/advisories/GHSA-6955-hrm5-c4qp"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/Sylius/Sylius"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-863" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-07-09T21:03:46Z",
    "nvd_published_at" : null
  }
}