CVE-2025-30152: Sylius PayPal Plugin Order Manipulation Vulnerability
Summary
CVE-2025-30152: Sylius PayPal Plugin has an Order Manipulation Vulnerability after PayPal Checkout. Affects sylius/paypal-plugin across 3 version ranges.
< 1.6.2
>= 1.7.0, < 1.7.2
>= 2.0.0, < 2.0.2
Fixed in 1.6.2, 1.7.2 or 2.0.2, depending on the release line you run. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The Sylius PayPal Plugin is an extension for the Sylius eCommerce platform that facilitates PayPal transactions. It allows merchants to integrate PayPal as a payment method, enabling customers to complete purchases seamlessly. However, a vulnerability has been identified that allows users to manipulate their shopping cart after completing the PayPal checkout process, potentially leading to financial losses for merchants.
Vulnerability Detail
The vulnerability arises from a flaw in the order completion process of the Sylius PayPal Plugin. After a user initiates a PayPal transaction and returns to the order summary page, they can alter the cart contents before finalizing the order. This manipulation can result in the order amount in Sylius being higher than the amount actually captured by PayPal, allowing users to receive products or services without paying the full amount. This compromises the integrity of the payment process and can lead to significant financial losses for merchants.
How To Fix
Fixed versions by release line
The minimum fixed version depends on the release line you run.
-
< 1.6.21.6.2composer require sylius/paypal-plugin:1.6.2 -
>= 1.7.0, < 1.7.21.7.2composer require sylius/paypal-plugin:1.7.2 -
>= 2.0.0, < 2.0.22.0.2composer require sylius/paypal-plugin:2.0.2
Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →
Workaround
If updating is not immediately possible, you can implement a workaround by overriding the 'PayPalOrderCompleteProcessor' with modified logic. Here is a sample code for the override:
<?php
declare(strict_types=1);
namespace App\Processor;
use Sylius\Bundle\PayumBundle\Model\GatewayConfigInterface;
use Sylius\Component\Core\Model\OrderInterface;
use Sylius\Component\Core\Model\PaymentInterface;
use Sylius\Component\Core\Model\PaymentMethodInterface;
use Sylius\PayPalPlugin\Manager\PaymentStateManagerInterface;
final class PayPalOrderCompleteProcessor
{
public function __construct(private readonly PaymentStateManagerInterface $paymentStateManager) {
}
public function completePayPalOrder(OrderInterface $order): void
{
$payment = $order->getLastPayment(PaymentInterface::STATE_PROCESSING);
if ($payment === null) {
return;
}
/** @var PaymentMethodInterface $paymentMethod */
$paymentMethod = $payment->getMethod();
/** @var GatewayConfigInterface $gatewayConfig */
$gatewayConfig = $paymentMethod->getGatewayConfig();
if ($gatewayConfig->getFactoryName() !== 'sylius.pay_pal') {
return;
}
try {
$this->verify($payment);
} catch (\Exception) {
$this->paymentStateManager->cancel($payment);
return;
}
$this->paymentStateManager->complete($payment);
}
private function verify(PaymentInterface $payment): void
{
$totalAmount = $this->getTotalPaymentAmountFromPaypal($payment);
if ($payment->getOrder()->getTotal() !== $totalAmount) {
throw new \Exception();
}
}
private function getTotalPaymentAmountFromPaypal(PaymentInterface $payment): int
{
$details = $payment->getDetails();
return $details['payment_amount'] ?? 0;
}
}
Conclusion
The Sylius PayPal Plugin has a significant vulnerability that can lead to financial losses for merchants. It is crucial to update to the patched versions or implement the provided workaround to mitigate the risks associated with this issue.
See every vulnerability recorded for sylius/paypal-plugin →
FAQ
CVE-2025-30152 is a vulnerability in the Sylius PayPal Plugin that allows users to manipulate their shopping cart after completing a PayPal checkout.
The vulnerability can lead to users receiving products or services without paying the full amount, resulting in financial losses for merchants.
You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability without any signup.
You can implement a workaround by overriding the 'PayPalOrderCompleteProcessor' with modified logic as provided in the workaround section.
The CVSS score of this vulnerability is 6.5, indicating a moderate severity level.
References
Related vulnerabilities
Recent vulnerabilities recorded for sylius/paypal-plugin.