CVE-2025-30152: Sylius/paypal plugin Sylius PayPal Plugin Has An Vulnerability

MODERATE
Advisory Identifier: GHSA-hxg4-65p5-9w37
CVSS 6.5
CWE-472
Published
Advisory Summary

CVE-2025-30152 is a MODERATE (CVSS 6.5) sylius paypal plugin has an vulnerability (CWE-472: External Control of Assumed-Immutable Web Parameter) affecting Sylius/paypal plugin libraries in the Packagist ecosystem. The issue involves sylius paypal plugin has an order manipulation vulnerability after paypal checkout. Remediation is available by upgrading affected packages to version 1.6.2, 1.7.2, 2.0.2.

CVE-2025-30152 at a Glance

CVE Identifier CVE-2025-30152
GHSA Identifier GHSA-hxg4-65p5-9w37
Severity MODERATE
CVSS v3.1 Base Score 6.5
CWE Classification CWE-472: External Control of Assumed-Immutable Web Parameter
Affected Product Sylius/paypal plugin
Package Ecosystem Packagist
Published Date
Last Updated

Security Impact

CVSS: 6.5

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

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

How to Fix CVE-2025-30152

To remediate this vulnerability, upgrade all affected Sylius/paypal plugin 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/paypal-plugin fixed: 1.6.2
Upgrade sylius/paypal-plugin to 1.6.2
sylius/paypal-plugin fixed: 1.7.2
Upgrade sylius/paypal-plugin to 1.7.2
sylius/paypal-plugin fixed: 2.0.2
Upgrade sylius/paypal-plugin to 2.0.2
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/paypal-plugin

How to Check if You Are Affected

To determine whether your application is affected by CVE-2025-30152, inspect your project dependencies for Sylius/paypal plugin:

inspect dependencies for sylius/paypal-plugin

Analyze the terminal output to locate any version of Sylius/paypal plugin in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.6.2), 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-472: External Control of Assumed-Immutable Web Parameter, where the web application does not sufficiently verify inputs that are assumed to be immutable but are actually externally controllable, such as hidden form fields. In Sylius/paypal plugin, 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

A discovered vulnerability allows users to modify their shopping cart after completing the PayPal Checkout process and payment authorization. If a user initiates a PayPal transaction from a product page or the cart page and then returns to the order summary page, they can still manipulate the cart contents before finalizing the order. As a result, the order amount in Sylius may be higher than the amount actually captured by PayPal, leading to a scenario where merchants deliver products or services without full payment. ### Impact - Users can exploit this flaw to receive products/services without paying the full amount. - Merchants may suffer financial losses due to underpaid orders. - Trust in the integrity of the payment process is compromised. ### Patches The issue is fixed in versions: 1.6.2, 1.7.2, 2.0.2 and above. ### Workarounds To resolve the problem in the end application without updating to the newest patches, there is a need to overwrite `PayPalOrderCompleteProcessor` with modified logic: ```php <?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; } } ``` ### IMPORTANT For `PayPalPlugin 2.x` change: ```php $gatewayConfig->getFactoryName() !== 'sylius.pay_pal' ``` to ```php $gatewayConfig->getFactoryName() !== SyliusPayPalExtension::PAYPAL_FACTORY_NAME ``` Also there is a need to overwrite `CompletePayPalOrderListener` with modified logic: ```php <?php declare(strict_types=1); namespace App\EventListener\Workflow; use App\Processor\PayPalOrderCompleteProcessor; use Sylius\Component\Core\Model\OrderInterface; use Symfony\Component\Workflow\Event\CompletedEvent; use Webmozart\Assert\Assert; final class CompletePayPalOrderListener { public function __construct(private readonly PayPalOrderCompleteProcessor $completeProcessor) { } public function __invoke(CompletedEvent $event): void { /** @var OrderInterface $order */ $order = $event->getSubject(); Assert::isInstanceOf($order, OrderInterface::class); $this->completeProcessor->completePayPalOrder($order); } } ``` And to overwrite `CaptureAction` with modified logic (if you didn't have it already): ```php <?php declare(strict_types=1); namespace App\Payum\Action; use Payum\Core\Action\ActionInterface; use Payum\Core\Exception\RequestNotSupportedException; use Payum\Core\Request\Capture; use Sylius\Component\Core\Model\PaymentInterface; use Sylius\Component\Core\Model\PaymentMethodInterface; use Sylius\PayPalPlugin\Api\CacheAuthorizeClientApiInterface; use Sylius\PayPalPlugin\Api\CreateOrderApiInterface; use Sylius\PayPalPlugin\Payum\Action\StatusAction; use Sylius\PayPalPlugin\Provider\UuidProviderInterface; final class CaptureAction implements ActionInterface { public function __construct( private CacheAuthorizeClientApiInterface $authorizeClientApi, private CreateOrderApiInterface $createOrderApi, private UuidProviderInterface $uuidProvider, ) { } /** @param Capture $request */ public function execute($request): void { RequestNotSupportedException::assertSupports($this, $request); /** @var PaymentInterface $payment */ $payment = $request->getModel(); /** @var PaymentMethodInterface $paymentMethod */ $paymentMethod = $payment->getMethod(); $token = $this->authorizeClientApi->authorize($paymentMethod); $referenceId = $this->uuidProvider->provide(); $content = $this->createOrderApi->create($token, $payment, $referenceId); if ($content['status'] === 'CREATED') { $payment->setDetails([ 'status' => StatusAction::STATUS_CAPTURED, 'paypal_order_id' => $content['id'], 'reference_id' => $referenceId, 'payment_amount' => $payment->getAmount(), ]); } } public function supports($request): bool { return $request instanceof Capture && $request->getModel() instanceof PaymentInterface ; } } ``` After that, register services in the container when using PayPal 1.x: ```yaml Sylius\PayPalPlugin\EventListener\Workflow\CompletePayPalOrderListener: class: App\EventListener\Workflow\CompletePayPalOrderListener public: true arguments: - '@Sylius\PayPalPlugin\Processor\PayPalOrderCompleteProcessor' tags: - { name: 'kernel.event_listener', event: 'workflow.sylius_order_checkout.completed.complete', priority: 100 } Sylius\PayPalPlugin\Processor\PayPalOrderCompleteProcessor: class: App\Processor\PayPalOrderCompleteProcessor public: true arguments: - '@Sylius\PayPalPlugin\Manager\PaymentStateManagerInterface' Sylius\PayPalPlugin\Payum\Action\CaptureAction: class: App\Payum\Action\CaptureAction public: true arguments: - '@Sylius\PayPalPlugin\Api\CacheAuthorizeClientApiInterface' - '@Sylius\PayPalPlugin\Api\CreateOrderApiInterface' - '@Sylius\PayPalPlugin\Provider\UuidProviderInterface' tags: - { name: 'payum.action', factory: 'sylius.pay_pal', alias: 'payum.action.capture' } ``` or when using PayPal 2.x: ```yaml sylius_paypal.listener.workflow.complete_paypal_order: class: App\EventListener\Workflow\CompletePayPalOrderListener public: true arguments: - '@sylius_paypal.processor.paypal_order_complete' tags: - { name: 'kernel.event_listener', event: 'workflow.sylius_order_checkout.completed.complete', priority: 100 } sylius_paypal.processor.paypal_order_complete: class: App\Processor\PayPalOrderCompleteProcessor public: true arguments: - '@sylius_paypal.manager.payment_state' sylius_paypal.payum.action.capture: class: App\Payum\Action\CaptureAction public: true arguments: - '@sylius_paypal.api.cache_authorize_client' - '@sylius_paypal.api.create_order' - '@sylius_paypal.provider.uuid' tags: - { name: 'payum.action', factory: 'sylius.paypal', alias: 'payum.action.capture' } ``` ### 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) * Email us at security@sylius.com

CVE-2025-30152 Affected Sylius/paypal plugin Versions

3 component(s)
Fixed Versions:
1.6.21.7.22.0.2
Product / Package Ecosystem Affected Versions Fixed Version
sylius/paypal-plugin
Packagist
< 1.6.2
1.6.2
sylius/paypal-plugin
Packagist
≥ 1.7.0
< 1.7.2
1.7.2
sylius/paypal-plugin
Packagist
≥ 2.0.0
< 2.0.2
2.0.2

References

Frequently Asked Questions

What is CVE-2025-30152?
CVE-2025-30152 is a security vulnerability in Sylius/paypal plugin involving Sylius PayPal Plugin has an Order Manipulation Vulnerability after PayPal Checkout under CWE-472: External Control of Assumed-Immutable Web Parameter.
Which Sylius/paypal plugin versions are affected?
Affected versions include releases prior to 1.6.2, 1.7.2, 2.0.2 across affected packages: sylius/paypal-plugin.
What version fixes CVE-2025-30152?
Upgrading to 1.6.2, 1.7.2, 2.0.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is sylius/paypal-plugin affected?
Yes, sylius/paypal-plugin is affected in releases prior to 1.6.2, 1.7.2, 2.0.2. Upgrade your dependency to 1.6.2, 1.7.2, 2.0.2 or later.
What is the CVSS score of CVE-2025-30152?
CVE-2025-30152 has a CVSS v3.1 base score of 6.5 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N.
What CWE is associated with CVE-2025-30152?
CVE-2025-30152 is classified under CWE-472: External Control of Assumed-Immutable Web Parameter (The web application does not sufficiently verify inputs that are assumed to be immutable but are actually externally controllable, such as hidden form fields.).
How can I check Packagist dependencies for CVE-2025-30152?
Run the dependency tree command: 'inspect dependencies for sylius/paypal-plugin'. 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-hxg4-65p5-9w37",
  "modified" : "2025-03-20T18:59:42Z",
  "published" : "2025-03-19T16:46:30Z",
  "aliases" : [ "CVE-2025-30152" ],
  "summary" : "Sylius PayPal Plugin has an Order Manipulation Vulnerability after PayPal Checkout",
  "details" : "A discovered vulnerability allows users to modify their shopping cart after completing the PayPal Checkout process and payment authorization. If a user initiates a PayPal transaction from a product page or the cart page and then returns to the order summary page, they can still manipulate the cart contents before finalizing the order. As a result, the order amount in Sylius may be higher than the amount actually captured by PayPal, leading to a scenario where merchants deliver products or services without full payment.\n\n### Impact\n\n- Users can exploit this flaw to receive products/services without paying the full amount.\n- Merchants may suffer financial losses due to underpaid orders.\n- Trust in the integrity of the payment process is compromised.\n\n### Patches\n\nThe issue is fixed in versions: 1.6.2, 1.7.2, 2.0.2 and above.\n\n### Workarounds\n\nTo resolve the problem in the end application without updating to the newest patches, there is a need to overwrite `PayPalOrderCompleteProcessor` with modified logic:\n\n```php\n<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Processor;\n\nuse Sylius\\Bundle\\PayumBundle\\Model\\GatewayConfigInterface;\nuse Sylius\\Component\\Core\\Model\\OrderInterface;\nuse Sylius\\Component\\Core\\Model\\PaymentInterface;\nuse Sylius\\Component\\Core\\Model\\PaymentMethodInterface;\nuse Sylius\\PayPalPlugin\\Manager\\PaymentStateManagerInterface;\n\nfinal class PayPalOrderCompleteProcessor\n{\n    public function __construct(private readonly PaymentStateManagerInterface $paymentStateManager) {\n    }\n\n    public function completePayPalOrder(OrderInterface $order): void\n    {\n        $payment = $order->getLastPayment(PaymentInterface::STATE_PROCESSING);\n        if ($payment === null) {\n            return;\n        }\n\n        /** @var PaymentMethodInterface $paymentMethod */\n        $paymentMethod = $payment->getMethod();\n        /** @var GatewayConfigInterface $gatewayConfig */\n        $gatewayConfig = $paymentMethod->getGatewayConfig();\n\n        if ($gatewayConfig->getFactoryName() !== 'sylius.pay_pal') {\n            return;\n        }\n\n        try {\n            $this->verify($payment);\n        } catch (\\Exception) {\n            $this->paymentStateManager->cancel($payment);\n\n            return;\n        }\n\n        $this->paymentStateManager->complete($payment);\n    }\n\n    private function verify(PaymentInterface $payment): void\n    {\n        $totalAmount = $this->getTotalPaymentAmountFromPaypal($payment);\n\n        if ($payment->getOrder()->getTotal() !== $totalAmount) {\n            throw new \\Exception();\n        }\n    }\n\n    private function getTotalPaymentAmountFromPaypal(PaymentInterface $payment): int\n    {\n        $details = $payment->getDetails();\n\n        return $details['payment_amount'] ?? 0;\n    }\n}\n```\n\n### IMPORTANT\n\nFor `PayPalPlugin 2.x` change:\n```php\n$gatewayConfig->getFactoryName() !== 'sylius.pay_pal'\n```\nto\n```php\n$gatewayConfig->getFactoryName() !== SyliusPayPalExtension::PAYPAL_FACTORY_NAME\n```\n\nAlso there is a need to overwrite `CompletePayPalOrderListener` with modified logic:\n\n```php\n<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\EventListener\\Workflow;\n\nuse App\\Processor\\PayPalOrderCompleteProcessor;\nuse Sylius\\Component\\Core\\Model\\OrderInterface;\nuse Symfony\\Component\\Workflow\\Event\\CompletedEvent;\nuse Webmozart\\Assert\\Assert;\n\nfinal class CompletePayPalOrderListener\n{\n    public function __construct(private readonly PayPalOrderCompleteProcessor $completeProcessor)\n    {\n    }\n\n    public function __invoke(CompletedEvent $event): void\n    {\n        /** @var OrderInterface $order */\n        $order = $event->getSubject();\n        Assert::isInstanceOf($order, OrderInterface::class);\n\n        $this->completeProcessor->completePayPalOrder($order);\n    }\n}\n\n```\n\nAnd to overwrite `CaptureAction` with modified logic (if you didn't have it already):\n\n```php\n<?php\n\ndeclare(strict_types=1);\n\nnamespace App\\Payum\\Action;\n\nuse Payum\\Core\\Action\\ActionInterface;\nuse Payum\\Core\\Exception\\RequestNotSupportedException;\nuse Payum\\Core\\Request\\Capture;\nuse Sylius\\Component\\Core\\Model\\PaymentInterface;\nuse Sylius\\Component\\Core\\Model\\PaymentMethodInterface;\nuse Sylius\\PayPalPlugin\\Api\\CacheAuthorizeClientApiInterface;\nuse Sylius\\PayPalPlugin\\Api\\CreateOrderApiInterface;\nuse Sylius\\PayPalPlugin\\Payum\\Action\\StatusAction;\nuse Sylius\\PayPalPlugin\\Provider\\UuidProviderInterface;\n\nfinal class CaptureAction implements ActionInterface\n{\n    public function __construct(\n        private CacheAuthorizeClientApiInterface $authorizeClientApi,\n        private CreateOrderApiInterface $createOrderApi,\n        private UuidProviderInterface $uuidProvider,\n    ) {\n    }\n\n    /** @param Capture $request */\n    public function execute($request): void\n    {\n        RequestNotSupportedException::assertSupports($this, $request);\n\n        /** @var PaymentInterface $payment */\n        $payment = $request->getModel();\n        /** @var PaymentMethodInterface $paymentMethod */\n        $paymentMethod = $payment->getMethod();\n\n        $token = $this->authorizeClientApi->authorize($paymentMethod);\n\n        $referenceId = $this->uuidProvider->provide();\n        $content = $this->createOrderApi->create($token, $payment, $referenceId);\n\n        if ($content['status'] === 'CREATED') {\n            $payment->setDetails([\n                'status' => StatusAction::STATUS_CAPTURED,\n                'paypal_order_id' => $content['id'],\n                'reference_id' => $referenceId,\n                'payment_amount' => $payment->getAmount(),\n            ]);\n        }\n    }\n\n    public function supports($request): bool\n    {\n        return\n            $request instanceof Capture &&\n            $request->getModel() instanceof PaymentInterface\n        ;\n    }\n}\n```\n\nAfter that, register services in the container when using PayPal 1.x:\n\n```yaml\nSylius\\PayPalPlugin\\EventListener\\Workflow\\CompletePayPalOrderListener:\n    class: App\\EventListener\\Workflow\\CompletePayPalOrderListener\n    public: true\n    arguments:\n        - '@Sylius\\PayPalPlugin\\Processor\\PayPalOrderCompleteProcessor'\n    tags: \n        - { name: 'kernel.event_listener', event: 'workflow.sylius_order_checkout.completed.complete', priority: 100 }\n    \nSylius\\PayPalPlugin\\Processor\\PayPalOrderCompleteProcessor:\n    class: App\\Processor\\PayPalOrderCompleteProcessor\n    public: true\n    arguments:\n        - '@Sylius\\PayPalPlugin\\Manager\\PaymentStateManagerInterface'\n\nSylius\\PayPalPlugin\\Payum\\Action\\CaptureAction:\n    class: App\\Payum\\Action\\CaptureAction\n    public: true\n    arguments:\n        - '@Sylius\\PayPalPlugin\\Api\\CacheAuthorizeClientApiInterface'\n        - '@Sylius\\PayPalPlugin\\Api\\CreateOrderApiInterface'\n        - '@Sylius\\PayPalPlugin\\Provider\\UuidProviderInterface'\n    tags:\n        - { name: 'payum.action', factory: 'sylius.pay_pal', alias: 'payum.action.capture' }\n```\n\nor when using PayPal 2.x:\n\n```yaml\nsylius_paypal.listener.workflow.complete_paypal_order:\n    class: App\\EventListener\\Workflow\\CompletePayPalOrderListener\n    public: true\n    arguments:\n        - '@sylius_paypal.processor.paypal_order_complete'\n    tags: \n        - { name: 'kernel.event_listener', event: 'workflow.sylius_order_checkout.completed.complete', priority: 100 }\n    \nsylius_paypal.processor.paypal_order_complete:\n    class: App\\Processor\\PayPalOrderCompleteProcessor\n    public: true\n    arguments:\n        - '@sylius_paypal.manager.payment_state'\n\nsylius_paypal.payum.action.capture:\n    class: App\\Payum\\Action\\CaptureAction\n    public: true\n    arguments:\n        - '@sylius_paypal.api.cache_authorize_client'\n        - '@sylius_paypal.api.create_order'\n        - '@sylius_paypal.provider.uuid'\n    tags:\n        - { name: 'payum.action', factory: 'sylius.paypal', alias: 'payum.action.capture' }\n```\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n* Open an issue in [Sylius issues](https://github.com/Sylius/Sylius/issues)\n* Email us at security@sylius.com",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "sylius/paypal-plugin"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.6.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "sylius/paypal-plugin"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.7.0"
      }, {
        "fixed" : "1.7.2"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Packagist",
      "name" : "sylius/paypal-plugin"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.0.0"
      }, {
        "fixed" : "2.0.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/Sylius/PayPalPlugin/security/advisories/GHSA-hxg4-65p5-9w37"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-30152"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/Sylius/PayPalPlugin/commit/5613df827a6d4fc50862229295976200a68e97aa"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/Sylius/PayPalPlugin"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-472" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-03-19T16:46:30Z",
    "nvd_published_at" : "2025-03-19T16:15:33Z"
  }
}