CVE-2025-30152: Sylius/paypal plugin Sylius PayPal Plugin Has An Vulnerability
MODERATECVE-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
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).
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.
Upgrade sylius/paypal-plugin to 1.6.2
Upgrade sylius/paypal-plugin to 1.7.2
Upgrade sylius/paypal-plugin to 2.0.2
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
CVE-2025-30152 Affected Sylius/paypal plugin Versions
3 component(s)| 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?
Which Sylius/paypal plugin versions are affected?
What version fixes CVE-2025-30152?
Is sylius/paypal-plugin affected?
What is the CVSS score of CVE-2025-30152?
What CWE is associated with CVE-2025-30152?
How can I check Packagist dependencies for CVE-2025-30152?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"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"
}
}