Sylius CVE-2026-53638
MEDIUMSeverity by source
AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N
Low-privilege attacker, no user interaction, only integrity impact on payment method.
Primary rating from Vendor (https://github.com/Sylius/Sylius).
CVSS VectorVendor: https://github.com/Sylius/Sylius
Lifecycle Timeline
2DescriptionCVE.org
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
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):
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
bin/console cache:clearReporters
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
- Send an email to [security@sylius.com](mailto:security@sylius.com)
AnalysisAI
Payment method channel restriction bypass in Sylius allows authenticated shop customers to assign any globally enabled payment method to their own placed order, bypassing channel-specific payment method exclusions. The vulnerability affects Sylius versions 2.0.0-2.0.17, 2.1.0-2.1.14, and 2.2.0-2.2.5, and is fixed in versions 2.0.18, 2.1.15, and 2.2.6. No public exploit or active exploitation has been identified at this time.
Technical ContextAI
The vulnerability resides in the Sylius shop account API endpoint PATCH /api/v2/shop/account/orders/{tokenValue}/payments/{paymentId}, implemented in PHP. This endpoint is designed for authenticated customers to change the payment method of a placed but unpaid order (state STATE_NEW). Unlike the equivalent checkout endpoint, it lacks channel validation, leading to an incorrect authorization flaw (CWE-863). The affected package is composer/sylius/sylius, as identified by its CPE, and the issue is resolved by adding a check that the payment method is enabled for the order's channel.
RemediationAI
Upgrade Sylius to version 2.0.18, 2.1.15, or 2.2.6 or later. If immediate upgrade is not possible, apply the vendor-provided workaround: decorate the Sylius\Bundle\ApiBundle\Changer\PaymentMethodChangerInterface service with a channel-checking decorator that validates payment method availability for the channel, then register it in config/services.yaml and clear the cache. This workaround reproduces the missing validation, preventing the bypass; however, it requires custom code deployment and maintenance overhead.
In PHP versions 7.1.x below 7.1.33, 7.2.x below 7.2.24 and 7.3.x below 7.3.11 in certain configurations of FPM setup it
sapi/cgi/cgi_main.c in PHP before 5.3.12 and 5.4.x before 5.4.2, when configured as a CGI script (aka php-cgi), does not
(1) boardData102.php, (2) boardData103.php, (3) boardDataJP.php, (4) boardDataNA.php, and (5) boardDataWW.php in Netgear
The '/common/download_agent_installer.php' script in the Quest KACE System Management Appliance 8.0.318 is accessible by
ProjectSend versions prior to r1720 are affected by an improper authentication vulnerability. Rated critical severity (C
Roundcube Webmail contains a critical PHP object deserialization vulnerability (CVE-2025-49113, CVSS 9.9) that allows au
Util/PHP/eval-stdin.php in PHPUnit before 4.8.28 and 5.x before 5.6.3 allows remote attackers to execute arbitrary PHP c
Palo Alto Networks PAN-OS management web interface contains an authentication bypass allowing unauthenticated attackers
Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re
Nagios XI version xi-5.7.5 is affected by OS command injection. Rated high severity (CVSS 8.8), this vulnerability is re
The get_referers function in /opt/ws/bin/sblistpack in Sophos Web Appliance before 3.7.9.1 and 3.8 before 3.8.1.1 allows
The Backup Migration plugin for WordPress is vulnerable to Remote Code Execution in all versions up to, and including, 1
Same weakness CWE-863 – Incorrect Authorization
View allSame technique Authentication Bypass
View allShare
External POC / Exploit Code
Leaving vuln.today
GHSA-6955-hrm5-c4qp