Sylius Mollie Plugin has unauthenticated IDOR that leaks order token and customer PII
6.5
/ 10
Medium
Network
Low
None
None
Unchanged
Low
None
Low
Impact
Two unauthenticated Mollie shop endpoints look up orders by a sequential integer orderId
with no ownership or session check. Chained, they expose customer PII.
GET /{_locale}/thank-you (PageRedirectController::thankYouAction, route
sylius_mollie_shop_thank_you_page_redirect) loads the order with findOneBy(['id' => $orderId])
and returns a 302 whose Location header carries that order's tokenValue. Any orderId
thus yields that order's token. A non-existent id dereferences null and returns a 500. The
handler also writes the raw orderId into the session.
GET /{_locale}/get-code (QrCodeAction::fetchQrCodeFromOrder, route
sylius_mollie_shop_get_qr_code) runs the same lookup and returns the order's QR code and id
as JSON, ignoring the session cart; this is where the front-end got the integer id. A bad id
500s here too.
That tokenValue is the order's only access control. Passed to the Sylius core page
GET /{_locale}/register-after-checkout/{tokenValue} it returns a form pre-filled with the
customer's first name, last name and email. The full attack: enumerate orderId, read the
token from the redirect, read the PII, at roughly a 1-in-71 hit rate for guest orders.
register-after-checkout is Sylius core, not the plugin, and trusts the token by design, so
the leak is what must be fixed.
None of the plugin endpoints require a login, session or CSRF token.
Patches
Fixed in 2.2.8, 3.2.4 and 3.3.1.
Workarounds
If you cannot upgrade immediately, patch both endpoints at the project level by decorating
the plugin controllers. The decorators enforce ownership before delegating to the original
controller, so no plugin behaviour is lost. They keep the original orderId request contract,
so no front-end or asset changes are required. Works on both 2.2 and 3.x.
Step 1. Decorate the QR code controller
Create src/Controller/Mollie/SecureQrCodeAction.php in your Sylius project:
<?php
declare(strict_types=1);
namespace App\Controller\Mollie;
use Sylius\Component\Order\Context\CartContextInterface;
use Sylius\Component\Order\Context\CartNotFoundException;
use Sylius\MolliePlugin\Controller\Shop\QrCodeAction;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
final class SecureQrCodeAction
{
private const OWNED_ORDER_IDS_SESSION_KEY = 'sylius_mollie.owned_order_ids';
public function __construct(
private readonly QrCodeAction $inner,
private readonly CartContextInterface $cartContext,
) {
}
public function fetchQrCodeFromOrder(Request $request): JsonResponse
{
$orderId = $request->get('orderId');
try {
$cart = $this->cartContext->getCart();
} catch (CartNotFoundException) {
$cart = null;
}
if (null !== $orderId && (null === $cart || (string) $cart->getId() !== (string) $orderId)) {
return new JsonResponse([], Response::HTTP_FORBIDDEN);
}
if (null !== $cart && null !== $cart->getId() && $request->hasSession()) {
$session = $request->getSession();
$ownedIds = $session->get(self::OWNED_ORDER_IDS_SESSION_KEY, []);
$ownedIds[(string) $cart->getId()] = true;
$session->set(self::OWNED_ORDER_IDS_SESSION_KEY, $ownedIds);
}
return $this->inner->fetchQrCodeFromOrder($request);
}
public function createPayment(Request $request): Response
{
return $this->inner->createPayment($request);
}
public function removeQrCodeFromOrder(Request $request): JsonResponse
{
return $this->inner->removeQrCodeFromOrder($request);
}
}
Both decorators keep @.inner and only add an ownership check on orderId before handing
the request to the original action, so createPayment, removeQrCodeFromOrder and the
thank-you redirect all keep their original behaviour and the front-end contract is unchanged.
Sylius Mollie Plugin vulnerable to payment status forgery via the payment webhook
7.5
/ 10
High
Network
Low
None
None
Unchanged
None
High
None
Impact
The shop payment webhook POST /{_locale}/update-payment (route
sylius_mollie_shop_payment_webhook) accepts two independent, attacker-controlled
parameters: id (the Mollie payment ID, verified against Mollie's API) and orderId (the
Sylius order ID, read directly from the database). The handler never verifies that the
Mollie payment belongs to the referenced order.
An unauthenticated attacker who holds any valid paid Mollie payment ID, for example
from a EUR 1 order they placed themselves, can submit it together with any victim
orderId. The victim's order payment is then transitioned to completed (or any other
Mollie-derived state) without any funds being transferred for that order. Sylius order IDs
are sequential integers, and the endpoint requires no authentication, CSRF token or rate
limiting, so the attack scales trivially across all pending orders.
Patches
Fixed in versions 2.2.8, 3.2.4 and 3.3.1. The webhook now binds the payment to
the order: it reads the Mollie payment ID stored server-side for that order when the payment
was created and compares it to the incoming Mollie payment ID. On mismatch the request is
acknowledged with HTTP 200 and no state change is applied. HTTP 200 is intentional,
because Mollie retries the webhook on any non-2xx response.
The stored ID lives in one of two places depending on the checkout flow, and the fix reads
both of them (mirroring CaptureAction):
payment.getDetails()['payment_mollie_id'] for the standard Shop API and Apple Pay Direct
flows, stored in CreatePaymentAction.
order.getMolliePaymentId() for the QR-code flow, which stores the ID on the order itself
(QrCodeAction).
Reading only the payment details would reject legitimate QR-code payments, because their
payment details carry no payment_mollie_id, so both sources must be consulted.
Workarounds
If you cannot upgrade immediately, patch the vulnerability at the project level by
decorating the plugin's webhook controller. The decorator checks that the incoming Mollie
id matches the id stored for that order before handing over to the original controller,
so no plugin behaviour (state machine, logging) is lost and no extra Mollie API call is
made. Works on both 2.2 and 3.x.
Step 1. Create the decorator
Create src/Controller/Mollie/SecurePaymentWebhookController.php in your Sylius project:
<?php
declare(strict_types=1);
namespace App\Controller\Mollie;
use Sylius\Component\Core\Model\OrderInterface;
use Sylius\Component\Order\Repository\OrderRepositoryInterface;
use Sylius\MolliePlugin\Controller\Shop\PaymentWebhookController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
final class SecurePaymentWebhookController
{
public function __construct(
private readonly PaymentWebhookController $inner,
private readonly OrderRepositoryInterface $orderRepository,
) {
}
public function __invoke(Request $request): Response
{
$orderId = $request->get('orderId');
$molliePaymentId = $request->get('id');
if (null === $orderId || null === $molliePaymentId) {
return ($this->inner)($request);
}
/** @var OrderInterface|null $order */
$order = $this->orderRepository->findOneBy(['id' => $orderId]);
if (null === $order) {
return ($this->inner)($request);
}
$storedMollieId = $this->resolveStoredMollieId($order);
// Reject any webhook whose Mollie id does not match the one stored for this order.
// 200 is intentional: Mollie retries on any non-2xx response.
if (null === $storedMollieId || $storedMollieId !== (string) $molliePaymentId) {
return new JsonResponse(null, Response::HTTP_OK);
}
return ($this->inner)($request);
}
private function resolveStoredMollieId(OrderInterface $order): ?string
{
$payment = $order->getLastPayment();
$fromDetails = $payment?->getDetails()['payment_mollie_id'] ?? null;
if (null !== $fromDetails && '' !== $fromDetails) {
return (string) $fromDetails;
}
// QR-code flow stores the Mollie id on the order itself.
if (method_exists($order, 'getMolliePaymentId')) {
$fromOrder = $order->getMolliePaymentId();
if (null !== $fromOrder && '' !== $fromOrder) {
return (string) $fromOrder;
}
}
return null;
}
}
decorates: keeps the original service ID, so the route
_controller: sylius_mollie.controller.shop.payment_webhook keeps working with no route
changes. @.inner is the original plugin controller.
Sylius Mollie Plugin has unauthenticated IDOR that leaks order token and customer PII
6.5
/ 10
Medium
Network
Low
None
None
Unchanged
Low
None
Low
Impact
Two unauthenticated Mollie shop endpoints look up orders by a sequential integer orderId
with no ownership or session check. Chained, they expose customer PII.
GET /{_locale}/thank-you (PageRedirectController::thankYouAction, route
sylius_mollie_shop_thank_you_page_redirect) loads the order with findOneBy(['id' => $orderId])
and returns a 302 whose Location header carries that order's tokenValue. Any orderId
thus yields that order's token. A non-existent id dereferences null and returns a 500. The
handler also writes the raw orderId into the session.
GET /{_locale}/get-code (QrCodeAction::fetchQrCodeFromOrder, route
sylius_mollie_shop_get_qr_code) runs the same lookup and returns the order's QR code and id
as JSON, ignoring the session cart; this is where the front-end got the integer id. A bad id
500s here too.
That tokenValue is the order's only access control. Passed to the Sylius core page
GET /{_locale}/register-after-checkout/{tokenValue} it returns a form pre-filled with the
customer's first name, last name and email. The full attack: enumerate orderId, read the
token from the redirect, read the PII, at roughly a 1-in-71 hit rate for guest orders.
register-after-checkout is Sylius core, not the plugin, and trusts the token by design, so
the leak is what must be fixed.
None of the plugin endpoints require a login, session or CSRF token.
Patches
Fixed in 2.2.8, 3.2.4 and 3.3.1.
Workarounds
If you cannot upgrade immediately, patch both endpoints at the project level by decorating
the plugin controllers. The decorators enforce ownership before delegating to the original
controller, so no plugin behaviour is lost. They keep the original orderId request contract,
so no front-end or asset changes are required. Works on both 2.2 and 3.x.
Step 1. Decorate the QR code controller
Create src/Controller/Mollie/SecureQrCodeAction.php in your Sylius project:
<?php
declare(strict_types=1);
namespace App\Controller\Mollie;
use Sylius\Component\Order\Context\CartContextInterface;
use Sylius\Component\Order\Context\CartNotFoundException;
use Sylius\MolliePlugin\Controller\Shop\QrCodeAction;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
final class SecureQrCodeAction
{
private const OWNED_ORDER_IDS_SESSION_KEY = 'sylius_mollie.owned_order_ids';
public function __construct(
private readonly QrCodeAction $inner,
private readonly CartContextInterface $cartContext,
) {
}
public function fetchQrCodeFromOrder(Request $request): JsonResponse
{
$orderId = $request->get('orderId');
try {
$cart = $this->cartContext->getCart();
} catch (CartNotFoundException) {
$cart = null;
}
if (null !== $orderId && (null === $cart || (string) $cart->getId() !== (string) $orderId)) {
return new JsonResponse([], Response::HTTP_FORBIDDEN);
}
if (null !== $cart && null !== $cart->getId() && $request->hasSession()) {
$session = $request->getSession();
$ownedIds = $session->get(self::OWNED_ORDER_IDS_SESSION_KEY, []);
$ownedIds[(string) $cart->getId()] = true;
$session->set(self::OWNED_ORDER_IDS_SESSION_KEY, $ownedIds);
}
return $this->inner->fetchQrCodeFromOrder($request);
}
public function createPayment(Request $request): Response
{
return $this->inner->createPayment($request);
}
public function removeQrCodeFromOrder(Request $request): JsonResponse
{
return $this->inner->removeQrCodeFromOrder($request);
}
}
Both decorators keep @.inner and only add an ownership check on orderId before handing
the request to the original action, so createPayment, removeQrCodeFromOrder and the
thank-you redirect all keep their original behaviour and the front-end contract is unchanged.
Sylius Mollie Plugin vulnerable to payment status forgery via the payment webhook
7.5
/ 10
High
Network
Low
None
None
Unchanged
None
High
None
Impact
The shop payment webhook POST /{_locale}/update-payment (route
sylius_mollie_shop_payment_webhook) accepts two independent, attacker-controlled
parameters: id (the Mollie payment ID, verified against Mollie's API) and orderId (the
Sylius order ID, read directly from the database). The handler never verifies that the
Mollie payment belongs to the referenced order.
An unauthenticated attacker who holds any valid paid Mollie payment ID, for example
from a EUR 1 order they placed themselves, can submit it together with any victim
orderId. The victim's order payment is then transitioned to completed (or any other
Mollie-derived state) without any funds being transferred for that order. Sylius order IDs
are sequential integers, and the endpoint requires no authentication, CSRF token or rate
limiting, so the attack scales trivially across all pending orders.
Patches
Fixed in versions 2.2.8, 3.2.4 and 3.3.1. The webhook now binds the payment to
the order: it reads the Mollie payment ID stored server-side for that order when the payment
was created and compares it to the incoming Mollie payment ID. On mismatch the request is
acknowledged with HTTP 200 and no state change is applied. HTTP 200 is intentional,
because Mollie retries the webhook on any non-2xx response.
The stored ID lives in one of two places depending on the checkout flow, and the fix reads
both of them (mirroring CaptureAction):
payment.getDetails()['payment_mollie_id'] for the standard Shop API and Apple Pay Direct
flows, stored in CreatePaymentAction.
order.getMolliePaymentId() for the QR-code flow, which stores the ID on the order itself
(QrCodeAction).
Reading only the payment details would reject legitimate QR-code payments, because their
payment details carry no payment_mollie_id, so both sources must be consulted.
Workarounds
If you cannot upgrade immediately, patch the vulnerability at the project level by
decorating the plugin's webhook controller. The decorator checks that the incoming Mollie
id matches the id stored for that order before handing over to the original controller,
so no plugin behaviour (state machine, logging) is lost and no extra Mollie API call is
made. Works on both 2.2 and 3.x.
Step 1. Create the decorator
Create src/Controller/Mollie/SecurePaymentWebhookController.php in your Sylius project:
<?php
declare(strict_types=1);
namespace App\Controller\Mollie;
use Sylius\Component\Core\Model\OrderInterface;
use Sylius\Component\Order\Repository\OrderRepositoryInterface;
use Sylius\MolliePlugin\Controller\Shop\PaymentWebhookController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
final class SecurePaymentWebhookController
{
public function __construct(
private readonly PaymentWebhookController $inner,
private readonly OrderRepositoryInterface $orderRepository,
) {
}
public function __invoke(Request $request): Response
{
$orderId = $request->get('orderId');
$molliePaymentId = $request->get('id');
if (null === $orderId || null === $molliePaymentId) {
return ($this->inner)($request);
}
/** @var OrderInterface|null $order */
$order = $this->orderRepository->findOneBy(['id' => $orderId]);
if (null === $order) {
return ($this->inner)($request);
}
$storedMollieId = $this->resolveStoredMollieId($order);
// Reject any webhook whose Mollie id does not match the one stored for this order.
// 200 is intentional: Mollie retries on any non-2xx response.
if (null === $storedMollieId || $storedMollieId !== (string) $molliePaymentId) {
return new JsonResponse(null, Response::HTTP_OK);
}
return ($this->inner)($request);
}
private function resolveStoredMollieId(OrderInterface $order): ?string
{
$payment = $order->getLastPayment();
$fromDetails = $payment?->getDetails()['payment_mollie_id'] ?? null;
if (null !== $fromDetails && '' !== $fromDetails) {
return (string) $fromDetails;
}
// QR-code flow stores the Mollie id on the order itself.
if (method_exists($order, 'getMolliePaymentId')) {
$fromOrder = $order->getMolliePaymentId();
if (null !== $fromOrder && '' !== $fromOrder) {
return (string) $fromOrder;
}
}
return null;
}
}
decorates: keeps the original service ID, so the route
_controller: sylius_mollie.controller.shop.payment_webhook keeps working with no route
changes. @.inner is the original plugin controller.
Sylius Mollie Plugin has unauthenticated IDOR that leaks order token and customer PII
6.5
/ 10
Medium
Network
Low
None
None
Unchanged
Low
None
Low
Impact
Two unauthenticated Mollie shop endpoints look up orders by a sequential integer orderId
with no ownership or session check. Chained, they expose customer PII.
GET /{_locale}/thank-you (PageRedirectController::thankYouAction, route
sylius_mollie_shop_thank_you_page_redirect) loads the order with findOneBy(['id' => $orderId])
and returns a 302 whose Location header carries that order's tokenValue. Any orderId
thus yields that order's token. A non-existent id dereferences null and returns a 500. The
handler also writes the raw orderId into the session.
GET /{_locale}/get-code (QrCodeAction::fetchQrCodeFromOrder, route
sylius_mollie_shop_get_qr_code) runs the same lookup and returns the order's QR code and id
as JSON, ignoring the session cart; this is where the front-end got the integer id. A bad id
500s here too.
That tokenValue is the order's only access control. Passed to the Sylius core page
GET /{_locale}/register-after-checkout/{tokenValue} it returns a form pre-filled with the
customer's first name, last name and email. The full attack: enumerate orderId, read the
token from the redirect, read the PII, at roughly a 1-in-71 hit rate for guest orders.
register-after-checkout is Sylius core, not the plugin, and trusts the token by design, so
the leak is what must be fixed.
None of the plugin endpoints require a login, session or CSRF token.
Patches
Fixed in 2.2.8, 3.2.4 and 3.3.1.
Workarounds
If you cannot upgrade immediately, patch both endpoints at the project level by decorating
the plugin controllers. The decorators enforce ownership before delegating to the original
controller, so no plugin behaviour is lost. They keep the original orderId request contract,
so no front-end or asset changes are required. Works on both 2.2 and 3.x.
Step 1. Decorate the QR code controller
Create src/Controller/Mollie/SecureQrCodeAction.php in your Sylius project:
<?php
declare(strict_types=1);
namespace App\Controller\Mollie;
use Sylius\Component\Order\Context\CartContextInterface;
use Sylius\Component\Order\Context\CartNotFoundException;
use Sylius\MolliePlugin\Controller\Shop\QrCodeAction;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
final class SecureQrCodeAction
{
private const OWNED_ORDER_IDS_SESSION_KEY = 'sylius_mollie.owned_order_ids';
public function __construct(
private readonly QrCodeAction $inner,
private readonly CartContextInterface $cartContext,
) {
}
public function fetchQrCodeFromOrder(Request $request): JsonResponse
{
$orderId = $request->get('orderId');
try {
$cart = $this->cartContext->getCart();
} catch (CartNotFoundException) {
$cart = null;
}
if (null !== $orderId && (null === $cart || (string) $cart->getId() !== (string) $orderId)) {
return new JsonResponse([], Response::HTTP_FORBIDDEN);
}
if (null !== $cart && null !== $cart->getId() && $request->hasSession()) {
$session = $request->getSession();
$ownedIds = $session->get(self::OWNED_ORDER_IDS_SESSION_KEY, []);
$ownedIds[(string) $cart->getId()] = true;
$session->set(self::OWNED_ORDER_IDS_SESSION_KEY, $ownedIds);
}
return $this->inner->fetchQrCodeFromOrder($request);
}
public function createPayment(Request $request): Response
{
return $this->inner->createPayment($request);
}
public function removeQrCodeFromOrder(Request $request): JsonResponse
{
return $this->inner->removeQrCodeFromOrder($request);
}
}
Both decorators keep @.inner and only add an ownership check on orderId before handing
the request to the original action, so createPayment, removeQrCodeFromOrder and the
thank-you redirect all keep their original behaviour and the front-end contract is unchanged.
Sylius Mollie Plugin vulnerable to payment status forgery via the payment webhook
7.5
/ 10
High
Network
Low
None
None
Unchanged
None
High
None
Impact
The shop payment webhook POST /{_locale}/update-payment (route
sylius_mollie_shop_payment_webhook) accepts two independent, attacker-controlled
parameters: id (the Mollie payment ID, verified against Mollie's API) and orderId (the
Sylius order ID, read directly from the database). The handler never verifies that the
Mollie payment belongs to the referenced order.
An unauthenticated attacker who holds any valid paid Mollie payment ID, for example
from a EUR 1 order they placed themselves, can submit it together with any victim
orderId. The victim's order payment is then transitioned to completed (or any other
Mollie-derived state) without any funds being transferred for that order. Sylius order IDs
are sequential integers, and the endpoint requires no authentication, CSRF token or rate
limiting, so the attack scales trivially across all pending orders.
Patches
Fixed in versions 2.2.8, 3.2.4 and 3.3.1. The webhook now binds the payment to
the order: it reads the Mollie payment ID stored server-side for that order when the payment
was created and compares it to the incoming Mollie payment ID. On mismatch the request is
acknowledged with HTTP 200 and no state change is applied. HTTP 200 is intentional,
because Mollie retries the webhook on any non-2xx response.
The stored ID lives in one of two places depending on the checkout flow, and the fix reads
both of them (mirroring CaptureAction):
payment.getDetails()['payment_mollie_id'] for the standard Shop API and Apple Pay Direct
flows, stored in CreatePaymentAction.
order.getMolliePaymentId() for the QR-code flow, which stores the ID on the order itself
(QrCodeAction).
Reading only the payment details would reject legitimate QR-code payments, because their
payment details carry no payment_mollie_id, so both sources must be consulted.
Workarounds
If you cannot upgrade immediately, patch the vulnerability at the project level by
decorating the plugin's webhook controller. The decorator checks that the incoming Mollie
id matches the id stored for that order before handing over to the original controller,
so no plugin behaviour (state machine, logging) is lost and no extra Mollie API call is
made. Works on both 2.2 and 3.x.
Step 1. Create the decorator
Create src/Controller/Mollie/SecurePaymentWebhookController.php in your Sylius project:
<?php
declare(strict_types=1);
namespace App\Controller\Mollie;
use Sylius\Component\Core\Model\OrderInterface;
use Sylius\Component\Order\Repository\OrderRepositoryInterface;
use Sylius\MolliePlugin\Controller\Shop\PaymentWebhookController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
final class SecurePaymentWebhookController
{
public function __construct(
private readonly PaymentWebhookController $inner,
private readonly OrderRepositoryInterface $orderRepository,
) {
}
public function __invoke(Request $request): Response
{
$orderId = $request->get('orderId');
$molliePaymentId = $request->get('id');
if (null === $orderId || null === $molliePaymentId) {
return ($this->inner)($request);
}
/** @var OrderInterface|null $order */
$order = $this->orderRepository->findOneBy(['id' => $orderId]);
if (null === $order) {
return ($this->inner)($request);
}
$storedMollieId = $this->resolveStoredMollieId($order);
// Reject any webhook whose Mollie id does not match the one stored for this order.
// 200 is intentional: Mollie retries on any non-2xx response.
if (null === $storedMollieId || $storedMollieId !== (string) $molliePaymentId) {
return new JsonResponse(null, Response::HTTP_OK);
}
return ($this->inner)($request);
}
private function resolveStoredMollieId(OrderInterface $order): ?string
{
$payment = $order->getLastPayment();
$fromDetails = $payment?->getDetails()['payment_mollie_id'] ?? null;
if (null !== $fromDetails && '' !== $fromDetails) {
return (string) $fromDetails;
}
// QR-code flow stores the Mollie id on the order itself.
if (method_exists($order, 'getMolliePaymentId')) {
$fromOrder = $order->getMolliePaymentId();
if (null !== $fromOrder && '' !== $fromOrder) {
return (string) $fromOrder;
}
}
return null;
}
}
decorates: keeps the original service ID, so the route
_controller: sylius_mollie.controller.shop.payment_webhook keeps working with no route
changes. @.inner is the original plugin controller.
Sylius Mollie Plugin has unauthenticated IDOR that leaks order token and customer PII
6.5
/ 10
Medium
Network
Low
None
None
Unchanged
Low
None
Low
Impact
Two unauthenticated Mollie shop endpoints look up orders by a sequential integer orderId
with no ownership or session check. Chained, they expose customer PII.
GET /{_locale}/thank-you (PageRedirectController::thankYouAction, route
sylius_mollie_shop_thank_you_page_redirect) loads the order with findOneBy(['id' => $orderId])
and returns a 302 whose Location header carries that order's tokenValue. Any orderId
thus yields that order's token. A non-existent id dereferences null and returns a 500. The
handler also writes the raw orderId into the session.
GET /{_locale}/get-code (QrCodeAction::fetchQrCodeFromOrder, route
sylius_mollie_shop_get_qr_code) runs the same lookup and returns the order's QR code and id
as JSON, ignoring the session cart; this is where the front-end got the integer id. A bad id
500s here too.
That tokenValue is the order's only access control. Passed to the Sylius core page
GET /{_locale}/register-after-checkout/{tokenValue} it returns a form pre-filled with the
customer's first name, last name and email. The full attack: enumerate orderId, read the
token from the redirect, read the PII, at roughly a 1-in-71 hit rate for guest orders.
register-after-checkout is Sylius core, not the plugin, and trusts the token by design, so
the leak is what must be fixed.
None of the plugin endpoints require a login, session or CSRF token.
Patches
Fixed in 2.2.8, 3.2.4 and 3.3.1.
Workarounds
If you cannot upgrade immediately, patch both endpoints at the project level by decorating
the plugin controllers. The decorators enforce ownership before delegating to the original
controller, so no plugin behaviour is lost. They keep the original orderId request contract,
so no front-end or asset changes are required. Works on both 2.2 and 3.x.
Step 1. Decorate the QR code controller
Create src/Controller/Mollie/SecureQrCodeAction.php in your Sylius project:
<?php
declare(strict_types=1);
namespace App\Controller\Mollie;
use Sylius\Component\Order\Context\CartContextInterface;
use Sylius\Component\Order\Context\CartNotFoundException;
use Sylius\MolliePlugin\Controller\Shop\QrCodeAction;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
final class SecureQrCodeAction
{
private const OWNED_ORDER_IDS_SESSION_KEY = 'sylius_mollie.owned_order_ids';
public function __construct(
private readonly QrCodeAction $inner,
private readonly CartContextInterface $cartContext,
) {
}
public function fetchQrCodeFromOrder(Request $request): JsonResponse
{
$orderId = $request->get('orderId');
try {
$cart = $this->cartContext->getCart();
} catch (CartNotFoundException) {
$cart = null;
}
if (null !== $orderId && (null === $cart || (string) $cart->getId() !== (string) $orderId)) {
return new JsonResponse([], Response::HTTP_FORBIDDEN);
}
if (null !== $cart && null !== $cart->getId() && $request->hasSession()) {
$session = $request->getSession();
$ownedIds = $session->get(self::OWNED_ORDER_IDS_SESSION_KEY, []);
$ownedIds[(string) $cart->getId()] = true;
$session->set(self::OWNED_ORDER_IDS_SESSION_KEY, $ownedIds);
}
return $this->inner->fetchQrCodeFromOrder($request);
}
public function createPayment(Request $request): Response
{
return $this->inner->createPayment($request);
}
public function removeQrCodeFromOrder(Request $request): JsonResponse
{
return $this->inner->removeQrCodeFromOrder($request);
}
}
Both decorators keep @.inner and only add an ownership check on orderId before handing
the request to the original action, so createPayment, removeQrCodeFromOrder and the
thank-you redirect all keep their original behaviour and the front-end contract is unchanged.
Sylius Mollie Plugin vulnerable to payment status forgery via the payment webhook
7.5
/ 10
High
Network
Low
None
None
Unchanged
None
High
None
Impact
The shop payment webhook POST /{_locale}/update-payment (route
sylius_mollie_shop_payment_webhook) accepts two independent, attacker-controlled
parameters: id (the Mollie payment ID, verified against Mollie's API) and orderId (the
Sylius order ID, read directly from the database). The handler never verifies that the
Mollie payment belongs to the referenced order.
An unauthenticated attacker who holds any valid paid Mollie payment ID, for example
from a EUR 1 order they placed themselves, can submit it together with any victim
orderId. The victim's order payment is then transitioned to completed (or any other
Mollie-derived state) without any funds being transferred for that order. Sylius order IDs
are sequential integers, and the endpoint requires no authentication, CSRF token or rate
limiting, so the attack scales trivially across all pending orders.
Patches
Fixed in versions 2.2.8, 3.2.4 and 3.3.1. The webhook now binds the payment to
the order: it reads the Mollie payment ID stored server-side for that order when the payment
was created and compares it to the incoming Mollie payment ID. On mismatch the request is
acknowledged with HTTP 200 and no state change is applied. HTTP 200 is intentional,
because Mollie retries the webhook on any non-2xx response.
The stored ID lives in one of two places depending on the checkout flow, and the fix reads
both of them (mirroring CaptureAction):
payment.getDetails()['payment_mollie_id'] for the standard Shop API and Apple Pay Direct
flows, stored in CreatePaymentAction.
order.getMolliePaymentId() for the QR-code flow, which stores the ID on the order itself
(QrCodeAction).
Reading only the payment details would reject legitimate QR-code payments, because their
payment details carry no payment_mollie_id, so both sources must be consulted.
Workarounds
If you cannot upgrade immediately, patch the vulnerability at the project level by
decorating the plugin's webhook controller. The decorator checks that the incoming Mollie
id matches the id stored for that order before handing over to the original controller,
so no plugin behaviour (state machine, logging) is lost and no extra Mollie API call is
made. Works on both 2.2 and 3.x.
Step 1. Create the decorator
Create src/Controller/Mollie/SecurePaymentWebhookController.php in your Sylius project:
<?php
declare(strict_types=1);
namespace App\Controller\Mollie;
use Sylius\Component\Core\Model\OrderInterface;
use Sylius\Component\Order\Repository\OrderRepositoryInterface;
use Sylius\MolliePlugin\Controller\Shop\PaymentWebhookController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
final class SecurePaymentWebhookController
{
public function __construct(
private readonly PaymentWebhookController $inner,
private readonly OrderRepositoryInterface $orderRepository,
) {
}
public function __invoke(Request $request): Response
{
$orderId = $request->get('orderId');
$molliePaymentId = $request->get('id');
if (null === $orderId || null === $molliePaymentId) {
return ($this->inner)($request);
}
/** @var OrderInterface|null $order */
$order = $this->orderRepository->findOneBy(['id' => $orderId]);
if (null === $order) {
return ($this->inner)($request);
}
$storedMollieId = $this->resolveStoredMollieId($order);
// Reject any webhook whose Mollie id does not match the one stored for this order.
// 200 is intentional: Mollie retries on any non-2xx response.
if (null === $storedMollieId || $storedMollieId !== (string) $molliePaymentId) {
return new JsonResponse(null, Response::HTTP_OK);
}
return ($this->inner)($request);
}
private function resolveStoredMollieId(OrderInterface $order): ?string
{
$payment = $order->getLastPayment();
$fromDetails = $payment?->getDetails()['payment_mollie_id'] ?? null;
if (null !== $fromDetails && '' !== $fromDetails) {
return (string) $fromDetails;
}
// QR-code flow stores the Mollie id on the order itself.
if (method_exists($order, 'getMolliePaymentId')) {
$fromOrder = $order->getMolliePaymentId();
if (null !== $fromOrder && '' !== $fromOrder) {
return (string) $fromOrder;
}
}
return null;
}
}
decorates: keeps the original service ID, so the route
_controller: sylius_mollie.controller.shop.payment_webhook keeps working with no route
changes. @.inner is the original plugin controller.
Sylius Mollie Plugin has unauthenticated IDOR that leaks order token and customer PII
6.5
/ 10
Medium
Network
Low
None
None
Unchanged
Low
None
Low
Impact
Two unauthenticated Mollie shop endpoints look up orders by a sequential integer orderId
with no ownership or session check. Chained, they expose customer PII.
GET /{_locale}/thank-you (PageRedirectController::thankYouAction, route
sylius_mollie_shop_thank_you_page_redirect) loads the order with findOneBy(['id' => $orderId])
and returns a 302 whose Location header carries that order's tokenValue. Any orderId
thus yields that order's token. A non-existent id dereferences null and returns a 500. The
handler also writes the raw orderId into the session.
GET /{_locale}/get-code (QrCodeAction::fetchQrCodeFromOrder, route
sylius_mollie_shop_get_qr_code) runs the same lookup and returns the order's QR code and id
as JSON, ignoring the session cart; this is where the front-end got the integer id. A bad id
500s here too.
That tokenValue is the order's only access control. Passed to the Sylius core page
GET /{_locale}/register-after-checkout/{tokenValue} it returns a form pre-filled with the
customer's first name, last name and email. The full attack: enumerate orderId, read the
token from the redirect, read the PII, at roughly a 1-in-71 hit rate for guest orders.
register-after-checkout is Sylius core, not the plugin, and trusts the token by design, so
the leak is what must be fixed.
None of the plugin endpoints require a login, session or CSRF token.
Patches
Fixed in 2.2.8, 3.2.4 and 3.3.1.
Workarounds
If you cannot upgrade immediately, patch both endpoints at the project level by decorating
the plugin controllers. The decorators enforce ownership before delegating to the original
controller, so no plugin behaviour is lost. They keep the original orderId request contract,
so no front-end or asset changes are required. Works on both 2.2 and 3.x.
Step 1. Decorate the QR code controller
Create src/Controller/Mollie/SecureQrCodeAction.php in your Sylius project:
<?php
declare(strict_types=1);
namespace App\Controller\Mollie;
use Sylius\Component\Order\Context\CartContextInterface;
use Sylius\Component\Order\Context\CartNotFoundException;
use Sylius\MolliePlugin\Controller\Shop\QrCodeAction;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
final class SecureQrCodeAction
{
private const OWNED_ORDER_IDS_SESSION_KEY = 'sylius_mollie.owned_order_ids';
public function __construct(
private readonly QrCodeAction $inner,
private readonly CartContextInterface $cartContext,
) {
}
public function fetchQrCodeFromOrder(Request $request): JsonResponse
{
$orderId = $request->get('orderId');
try {
$cart = $this->cartContext->getCart();
} catch (CartNotFoundException) {
$cart = null;
}
if (null !== $orderId && (null === $cart || (string) $cart->getId() !== (string) $orderId)) {
return new JsonResponse([], Response::HTTP_FORBIDDEN);
}
if (null !== $cart && null !== $cart->getId() && $request->hasSession()) {
$session = $request->getSession();
$ownedIds = $session->get(self::OWNED_ORDER_IDS_SESSION_KEY, []);
$ownedIds[(string) $cart->getId()] = true;
$session->set(self::OWNED_ORDER_IDS_SESSION_KEY, $ownedIds);
}
return $this->inner->fetchQrCodeFromOrder($request);
}
public function createPayment(Request $request): Response
{
return $this->inner->createPayment($request);
}
public function removeQrCodeFromOrder(Request $request): JsonResponse
{
return $this->inner->removeQrCodeFromOrder($request);
}
}
Both decorators keep @.inner and only add an ownership check on orderId before handing
the request to the original action, so createPayment, removeQrCodeFromOrder and the
thank-you redirect all keep their original behaviour and the front-end contract is unchanged.
Sylius Mollie Plugin vulnerable to payment status forgery via the payment webhook
7.5
/ 10
High
Network
Low
None
None
Unchanged
None
High
None
Impact
The shop payment webhook POST /{_locale}/update-payment (route
sylius_mollie_shop_payment_webhook) accepts two independent, attacker-controlled
parameters: id (the Mollie payment ID, verified against Mollie's API) and orderId (the
Sylius order ID, read directly from the database). The handler never verifies that the
Mollie payment belongs to the referenced order.
An unauthenticated attacker who holds any valid paid Mollie payment ID, for example
from a EUR 1 order they placed themselves, can submit it together with any victim
orderId. The victim's order payment is then transitioned to completed (or any other
Mollie-derived state) without any funds being transferred for that order. Sylius order IDs
are sequential integers, and the endpoint requires no authentication, CSRF token or rate
limiting, so the attack scales trivially across all pending orders.
Patches
Fixed in versions 2.2.8, 3.2.4 and 3.3.1. The webhook now binds the payment to
the order: it reads the Mollie payment ID stored server-side for that order when the payment
was created and compares it to the incoming Mollie payment ID. On mismatch the request is
acknowledged with HTTP 200 and no state change is applied. HTTP 200 is intentional,
because Mollie retries the webhook on any non-2xx response.
The stored ID lives in one of two places depending on the checkout flow, and the fix reads
both of them (mirroring CaptureAction):
payment.getDetails()['payment_mollie_id'] for the standard Shop API and Apple Pay Direct
flows, stored in CreatePaymentAction.
order.getMolliePaymentId() for the QR-code flow, which stores the ID on the order itself
(QrCodeAction).
Reading only the payment details would reject legitimate QR-code payments, because their
payment details carry no payment_mollie_id, so both sources must be consulted.
Workarounds
If you cannot upgrade immediately, patch the vulnerability at the project level by
decorating the plugin's webhook controller. The decorator checks that the incoming Mollie
id matches the id stored for that order before handing over to the original controller,
so no plugin behaviour (state machine, logging) is lost and no extra Mollie API call is
made. Works on both 2.2 and 3.x.
Step 1. Create the decorator
Create src/Controller/Mollie/SecurePaymentWebhookController.php in your Sylius project:
<?php
declare(strict_types=1);
namespace App\Controller\Mollie;
use Sylius\Component\Core\Model\OrderInterface;
use Sylius\Component\Order\Repository\OrderRepositoryInterface;
use Sylius\MolliePlugin\Controller\Shop\PaymentWebhookController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
final class SecurePaymentWebhookController
{
public function __construct(
private readonly PaymentWebhookController $inner,
private readonly OrderRepositoryInterface $orderRepository,
) {
}
public function __invoke(Request $request): Response
{
$orderId = $request->get('orderId');
$molliePaymentId = $request->get('id');
if (null === $orderId || null === $molliePaymentId) {
return ($this->inner)($request);
}
/** @var OrderInterface|null $order */
$order = $this->orderRepository->findOneBy(['id' => $orderId]);
if (null === $order) {
return ($this->inner)($request);
}
$storedMollieId = $this->resolveStoredMollieId($order);
// Reject any webhook whose Mollie id does not match the one stored for this order.
// 200 is intentional: Mollie retries on any non-2xx response.
if (null === $storedMollieId || $storedMollieId !== (string) $molliePaymentId) {
return new JsonResponse(null, Response::HTTP_OK);
}
return ($this->inner)($request);
}
private function resolveStoredMollieId(OrderInterface $order): ?string
{
$payment = $order->getLastPayment();
$fromDetails = $payment?->getDetails()['payment_mollie_id'] ?? null;
if (null !== $fromDetails && '' !== $fromDetails) {
return (string) $fromDetails;
}
// QR-code flow stores the Mollie id on the order itself.
if (method_exists($order, 'getMolliePaymentId')) {
$fromOrder = $order->getMolliePaymentId();
if (null !== $fromOrder && '' !== $fromOrder) {
return (string) $fromOrder;
}
}
return null;
}
}
decorates: keeps the original service ID, so the route
_controller: sylius_mollie.controller.shop.payment_webhook keeps working with no route
changes. @.inner is the original plugin controller.
Sylius Mollie Plugin has unauthenticated IDOR that leaks order token and customer PII
6.5
/ 10
Medium
Network
Low
None
None
Unchanged
Low
None
Low
Impact
Two unauthenticated Mollie shop endpoints look up orders by a sequential integer orderId
with no ownership or session check. Chained, they expose customer PII.
GET /{_locale}/thank-you (PageRedirectController::thankYouAction, route
sylius_mollie_shop_thank_you_page_redirect) loads the order with findOneBy(['id' => $orderId])
and returns a 302 whose Location header carries that order's tokenValue. Any orderId
thus yields that order's token. A non-existent id dereferences null and returns a 500. The
handler also writes the raw orderId into the session.
GET /{_locale}/get-code (QrCodeAction::fetchQrCodeFromOrder, route
sylius_mollie_shop_get_qr_code) runs the same lookup and returns the order's QR code and id
as JSON, ignoring the session cart; this is where the front-end got the integer id. A bad id
500s here too.
That tokenValue is the order's only access control. Passed to the Sylius core page
GET /{_locale}/register-after-checkout/{tokenValue} it returns a form pre-filled with the
customer's first name, last name and email. The full attack: enumerate orderId, read the
token from the redirect, read the PII, at roughly a 1-in-71 hit rate for guest orders.
register-after-checkout is Sylius core, not the plugin, and trusts the token by design, so
the leak is what must be fixed.
None of the plugin endpoints require a login, session or CSRF token.
Patches
Fixed in 2.2.8, 3.2.4 and 3.3.1.
Workarounds
If you cannot upgrade immediately, patch both endpoints at the project level by decorating
the plugin controllers. The decorators enforce ownership before delegating to the original
controller, so no plugin behaviour is lost. They keep the original orderId request contract,
so no front-end or asset changes are required. Works on both 2.2 and 3.x.
Step 1. Decorate the QR code controller
Create src/Controller/Mollie/SecureQrCodeAction.php in your Sylius project:
<?php
declare(strict_types=1);
namespace App\Controller\Mollie;
use Sylius\Component\Order\Context\CartContextInterface;
use Sylius\Component\Order\Context\CartNotFoundException;
use Sylius\MolliePlugin\Controller\Shop\QrCodeAction;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
final class SecureQrCodeAction
{
private const OWNED_ORDER_IDS_SESSION_KEY = 'sylius_mollie.owned_order_ids';
public function __construct(
private readonly QrCodeAction $inner,
private readonly CartContextInterface $cartContext,
) {
}
public function fetchQrCodeFromOrder(Request $request): JsonResponse
{
$orderId = $request->get('orderId');
try {
$cart = $this->cartContext->getCart();
} catch (CartNotFoundException) {
$cart = null;
}
if (null !== $orderId && (null === $cart || (string) $cart->getId() !== (string) $orderId)) {
return new JsonResponse([], Response::HTTP_FORBIDDEN);
}
if (null !== $cart && null !== $cart->getId() && $request->hasSession()) {
$session = $request->getSession();
$ownedIds = $session->get(self::OWNED_ORDER_IDS_SESSION_KEY, []);
$ownedIds[(string) $cart->getId()] = true;
$session->set(self::OWNED_ORDER_IDS_SESSION_KEY, $ownedIds);
}
return $this->inner->fetchQrCodeFromOrder($request);
}
public function createPayment(Request $request): Response
{
return $this->inner->createPayment($request);
}
public function removeQrCodeFromOrder(Request $request): JsonResponse
{
return $this->inner->removeQrCodeFromOrder($request);
}
}
Both decorators keep @.inner and only add an ownership check on orderId before handing
the request to the original action, so createPayment, removeQrCodeFromOrder and the
thank-you redirect all keep their original behaviour and the front-end contract is unchanged.
Sylius Mollie Plugin vulnerable to payment status forgery via the payment webhook
7.5
/ 10
High
Network
Low
None
None
Unchanged
None
High
None
Impact
The shop payment webhook POST /{_locale}/update-payment (route
sylius_mollie_shop_payment_webhook) accepts two independent, attacker-controlled
parameters: id (the Mollie payment ID, verified against Mollie's API) and orderId (the
Sylius order ID, read directly from the database). The handler never verifies that the
Mollie payment belongs to the referenced order.
An unauthenticated attacker who holds any valid paid Mollie payment ID, for example
from a EUR 1 order they placed themselves, can submit it together with any victim
orderId. The victim's order payment is then transitioned to completed (or any other
Mollie-derived state) without any funds being transferred for that order. Sylius order IDs
are sequential integers, and the endpoint requires no authentication, CSRF token or rate
limiting, so the attack scales trivially across all pending orders.
Patches
Fixed in versions 2.2.8, 3.2.4 and 3.3.1. The webhook now binds the payment to
the order: it reads the Mollie payment ID stored server-side for that order when the payment
was created and compares it to the incoming Mollie payment ID. On mismatch the request is
acknowledged with HTTP 200 and no state change is applied. HTTP 200 is intentional,
because Mollie retries the webhook on any non-2xx response.
The stored ID lives in one of two places depending on the checkout flow, and the fix reads
both of them (mirroring CaptureAction):
payment.getDetails()['payment_mollie_id'] for the standard Shop API and Apple Pay Direct
flows, stored in CreatePaymentAction.
order.getMolliePaymentId() for the QR-code flow, which stores the ID on the order itself
(QrCodeAction).
Reading only the payment details would reject legitimate QR-code payments, because their
payment details carry no payment_mollie_id, so both sources must be consulted.
Workarounds
If you cannot upgrade immediately, patch the vulnerability at the project level by
decorating the plugin's webhook controller. The decorator checks that the incoming Mollie
id matches the id stored for that order before handing over to the original controller,
so no plugin behaviour (state machine, logging) is lost and no extra Mollie API call is
made. Works on both 2.2 and 3.x.
Step 1. Create the decorator
Create src/Controller/Mollie/SecurePaymentWebhookController.php in your Sylius project:
<?php
declare(strict_types=1);
namespace App\Controller\Mollie;
use Sylius\Component\Core\Model\OrderInterface;
use Sylius\Component\Order\Repository\OrderRepositoryInterface;
use Sylius\MolliePlugin\Controller\Shop\PaymentWebhookController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
final class SecurePaymentWebhookController
{
public function __construct(
private readonly PaymentWebhookController $inner,
private readonly OrderRepositoryInterface $orderRepository,
) {
}
public function __invoke(Request $request): Response
{
$orderId = $request->get('orderId');
$molliePaymentId = $request->get('id');
if (null === $orderId || null === $molliePaymentId) {
return ($this->inner)($request);
}
/** @var OrderInterface|null $order */
$order = $this->orderRepository->findOneBy(['id' => $orderId]);
if (null === $order) {
return ($this->inner)($request);
}
$storedMollieId = $this->resolveStoredMollieId($order);
// Reject any webhook whose Mollie id does not match the one stored for this order.
// 200 is intentional: Mollie retries on any non-2xx response.
if (null === $storedMollieId || $storedMollieId !== (string) $molliePaymentId) {
return new JsonResponse(null, Response::HTTP_OK);
}
return ($this->inner)($request);
}
private function resolveStoredMollieId(OrderInterface $order): ?string
{
$payment = $order->getLastPayment();
$fromDetails = $payment?->getDetails()['payment_mollie_id'] ?? null;
if (null !== $fromDetails && '' !== $fromDetails) {
return (string) $fromDetails;
}
// QR-code flow stores the Mollie id on the order itself.
if (method_exists($order, 'getMolliePaymentId')) {
$fromOrder = $order->getMolliePaymentId();
if (null !== $fromOrder && '' !== $fromOrder) {
return (string) $fromOrder;
}
}
return null;
}
}
decorates: keeps the original service ID, so the route
_controller: sylius_mollie.controller.shop.payment_webhook keeps working with no route
changes. @.inner is the original plugin controller.
Sylius Mollie Plugin has unauthenticated IDOR that leaks order token and customer PII
6.5
/ 10
Medium
Network
Low
None
None
Unchanged
Low
None
Low
Impact
Two unauthenticated Mollie shop endpoints look up orders by a sequential integer orderId
with no ownership or session check. Chained, they expose customer PII.
GET /{_locale}/thank-you (PageRedirectController::thankYouAction, route
sylius_mollie_shop_thank_you_page_redirect) loads the order with findOneBy(['id' => $orderId])
and returns a 302 whose Location header carries that order's tokenValue. Any orderId
thus yields that order's token. A non-existent id dereferences null and returns a 500. The
handler also writes the raw orderId into the session.
GET /{_locale}/get-code (QrCodeAction::fetchQrCodeFromOrder, route
sylius_mollie_shop_get_qr_code) runs the same lookup and returns the order's QR code and id
as JSON, ignoring the session cart; this is where the front-end got the integer id. A bad id
500s here too.
That tokenValue is the order's only access control. Passed to the Sylius core page
GET /{_locale}/register-after-checkout/{tokenValue} it returns a form pre-filled with the
customer's first name, last name and email. The full attack: enumerate orderId, read the
token from the redirect, read the PII, at roughly a 1-in-71 hit rate for guest orders.
register-after-checkout is Sylius core, not the plugin, and trusts the token by design, so
the leak is what must be fixed.
None of the plugin endpoints require a login, session or CSRF token.
Patches
Fixed in 2.2.8, 3.2.4 and 3.3.1.
Workarounds
If you cannot upgrade immediately, patch both endpoints at the project level by decorating
the plugin controllers. The decorators enforce ownership before delegating to the original
controller, so no plugin behaviour is lost. They keep the original orderId request contract,
so no front-end or asset changes are required. Works on both 2.2 and 3.x.
Step 1. Decorate the QR code controller
Create src/Controller/Mollie/SecureQrCodeAction.php in your Sylius project:
<?php
declare(strict_types=1);
namespace App\Controller\Mollie;
use Sylius\Component\Order\Context\CartContextInterface;
use Sylius\Component\Order\Context\CartNotFoundException;
use Sylius\MolliePlugin\Controller\Shop\QrCodeAction;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
final class SecureQrCodeAction
{
private const OWNED_ORDER_IDS_SESSION_KEY = 'sylius_mollie.owned_order_ids';
public function __construct(
private readonly QrCodeAction $inner,
private readonly CartContextInterface $cartContext,
) {
}
public function fetchQrCodeFromOrder(Request $request): JsonResponse
{
$orderId = $request->get('orderId');
try {
$cart = $this->cartContext->getCart();
} catch (CartNotFoundException) {
$cart = null;
}
if (null !== $orderId && (null === $cart || (string) $cart->getId() !== (string) $orderId)) {
return new JsonResponse([], Response::HTTP_FORBIDDEN);
}
if (null !== $cart && null !== $cart->getId() && $request->hasSession()) {
$session = $request->getSession();
$ownedIds = $session->get(self::OWNED_ORDER_IDS_SESSION_KEY, []);
$ownedIds[(string) $cart->getId()] = true;
$session->set(self::OWNED_ORDER_IDS_SESSION_KEY, $ownedIds);
}
return $this->inner->fetchQrCodeFromOrder($request);
}
public function createPayment(Request $request): Response
{
return $this->inner->createPayment($request);
}
public function removeQrCodeFromOrder(Request $request): JsonResponse
{
return $this->inner->removeQrCodeFromOrder($request);
}
}
Both decorators keep @.inner and only add an ownership check on orderId before handing
the request to the original action, so createPayment, removeQrCodeFromOrder and the
thank-you redirect all keep their original behaviour and the front-end contract is unchanged.
Sylius Mollie Plugin vulnerable to payment status forgery via the payment webhook
7.5
/ 10
High
Network
Low
None
None
Unchanged
None
High
None
Impact
The shop payment webhook POST /{_locale}/update-payment (route
sylius_mollie_shop_payment_webhook) accepts two independent, attacker-controlled
parameters: id (the Mollie payment ID, verified against Mollie's API) and orderId (the
Sylius order ID, read directly from the database). The handler never verifies that the
Mollie payment belongs to the referenced order.
An unauthenticated attacker who holds any valid paid Mollie payment ID, for example
from a EUR 1 order they placed themselves, can submit it together with any victim
orderId. The victim's order payment is then transitioned to completed (or any other
Mollie-derived state) without any funds being transferred for that order. Sylius order IDs
are sequential integers, and the endpoint requires no authentication, CSRF token or rate
limiting, so the attack scales trivially across all pending orders.
Patches
Fixed in versions 2.2.8, 3.2.4 and 3.3.1. The webhook now binds the payment to
the order: it reads the Mollie payment ID stored server-side for that order when the payment
was created and compares it to the incoming Mollie payment ID. On mismatch the request is
acknowledged with HTTP 200 and no state change is applied. HTTP 200 is intentional,
because Mollie retries the webhook on any non-2xx response.
The stored ID lives in one of two places depending on the checkout flow, and the fix reads
both of them (mirroring CaptureAction):
payment.getDetails()['payment_mollie_id'] for the standard Shop API and Apple Pay Direct
flows, stored in CreatePaymentAction.
order.getMolliePaymentId() for the QR-code flow, which stores the ID on the order itself
(QrCodeAction).
Reading only the payment details would reject legitimate QR-code payments, because their
payment details carry no payment_mollie_id, so both sources must be consulted.
Workarounds
If you cannot upgrade immediately, patch the vulnerability at the project level by
decorating the plugin's webhook controller. The decorator checks that the incoming Mollie
id matches the id stored for that order before handing over to the original controller,
so no plugin behaviour (state machine, logging) is lost and no extra Mollie API call is
made. Works on both 2.2 and 3.x.
Step 1. Create the decorator
Create src/Controller/Mollie/SecurePaymentWebhookController.php in your Sylius project:
<?php
declare(strict_types=1);
namespace App\Controller\Mollie;
use Sylius\Component\Core\Model\OrderInterface;
use Sylius\Component\Order\Repository\OrderRepositoryInterface;
use Sylius\MolliePlugin\Controller\Shop\PaymentWebhookController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
final class SecurePaymentWebhookController
{
public function __construct(
private readonly PaymentWebhookController $inner,
private readonly OrderRepositoryInterface $orderRepository,
) {
}
public function __invoke(Request $request): Response
{
$orderId = $request->get('orderId');
$molliePaymentId = $request->get('id');
if (null === $orderId || null === $molliePaymentId) {
return ($this->inner)($request);
}
/** @var OrderInterface|null $order */
$order = $this->orderRepository->findOneBy(['id' => $orderId]);
if (null === $order) {
return ($this->inner)($request);
}
$storedMollieId = $this->resolveStoredMollieId($order);
// Reject any webhook whose Mollie id does not match the one stored for this order.
// 200 is intentional: Mollie retries on any non-2xx response.
if (null === $storedMollieId || $storedMollieId !== (string) $molliePaymentId) {
return new JsonResponse(null, Response::HTTP_OK);
}
return ($this->inner)($request);
}
private function resolveStoredMollieId(OrderInterface $order): ?string
{
$payment = $order->getLastPayment();
$fromDetails = $payment?->getDetails()['payment_mollie_id'] ?? null;
if (null !== $fromDetails && '' !== $fromDetails) {
return (string) $fromDetails;
}
// QR-code flow stores the Mollie id on the order itself.
if (method_exists($order, 'getMolliePaymentId')) {
$fromOrder = $order->getMolliePaymentId();
if (null !== $fromOrder && '' !== $fromOrder) {
return (string) $fromOrder;
}
}
return null;
}
}
decorates: keeps the original service ID, so the route
_controller: sylius_mollie.controller.shop.payment_webhook keeps working with no route
changes. @.inner is the original plugin controller.
Sylius Mollie Plugin has unauthenticated IDOR that leaks order token and customer PII
6.5
/ 10
Medium
Network
Low
None
None
Unchanged
Low
None
Low
Impact
Two unauthenticated Mollie shop endpoints look up orders by a sequential integer orderId
with no ownership or session check. Chained, they expose customer PII.
GET /{_locale}/thank-you (PageRedirectController::thankYouAction, route
sylius_mollie_shop_thank_you_page_redirect) loads the order with findOneBy(['id' => $orderId])
and returns a 302 whose Location header carries that order's tokenValue. Any orderId
thus yields that order's token. A non-existent id dereferences null and returns a 500. The
handler also writes the raw orderId into the session.
GET /{_locale}/get-code (QrCodeAction::fetchQrCodeFromOrder, route
sylius_mollie_shop_get_qr_code) runs the same lookup and returns the order's QR code and id
as JSON, ignoring the session cart; this is where the front-end got the integer id. A bad id
500s here too.
That tokenValue is the order's only access control. Passed to the Sylius core page
GET /{_locale}/register-after-checkout/{tokenValue} it returns a form pre-filled with the
customer's first name, last name and email. The full attack: enumerate orderId, read the
token from the redirect, read the PII, at roughly a 1-in-71 hit rate for guest orders.
register-after-checkout is Sylius core, not the plugin, and trusts the token by design, so
the leak is what must be fixed.
None of the plugin endpoints require a login, session or CSRF token.
Patches
Fixed in 2.2.8, 3.2.4 and 3.3.1.
Workarounds
If you cannot upgrade immediately, patch both endpoints at the project level by decorating
the plugin controllers. The decorators enforce ownership before delegating to the original
controller, so no plugin behaviour is lost. They keep the original orderId request contract,
so no front-end or asset changes are required. Works on both 2.2 and 3.x.
Step 1. Decorate the QR code controller
Create src/Controller/Mollie/SecureQrCodeAction.php in your Sylius project:
<?php
declare(strict_types=1);
namespace App\Controller\Mollie;
use Sylius\Component\Order\Context\CartContextInterface;
use Sylius\Component\Order\Context\CartNotFoundException;
use Sylius\MolliePlugin\Controller\Shop\QrCodeAction;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
final class SecureQrCodeAction
{
private const OWNED_ORDER_IDS_SESSION_KEY = 'sylius_mollie.owned_order_ids';
public function __construct(
private readonly QrCodeAction $inner,
private readonly CartContextInterface $cartContext,
) {
}
public function fetchQrCodeFromOrder(Request $request): JsonResponse
{
$orderId = $request->get('orderId');
try {
$cart = $this->cartContext->getCart();
} catch (CartNotFoundException) {
$cart = null;
}
if (null !== $orderId && (null === $cart || (string) $cart->getId() !== (string) $orderId)) {
return new JsonResponse([], Response::HTTP_FORBIDDEN);
}
if (null !== $cart && null !== $cart->getId() && $request->hasSession()) {
$session = $request->getSession();
$ownedIds = $session->get(self::OWNED_ORDER_IDS_SESSION_KEY, []);
$ownedIds[(string) $cart->getId()] = true;
$session->set(self::OWNED_ORDER_IDS_SESSION_KEY, $ownedIds);
}
return $this->inner->fetchQrCodeFromOrder($request);
}
public function createPayment(Request $request): Response
{
return $this->inner->createPayment($request);
}
public function removeQrCodeFromOrder(Request $request): JsonResponse
{
return $this->inner->removeQrCodeFromOrder($request);
}
}
Both decorators keep @.inner and only add an ownership check on orderId before handing
the request to the original action, so createPayment, removeQrCodeFromOrder and the
thank-you redirect all keep their original behaviour and the front-end contract is unchanged.
Sylius Mollie Plugin vulnerable to payment status forgery via the payment webhook
7.5
/ 10
High
Network
Low
None
None
Unchanged
None
High
None
Impact
The shop payment webhook POST /{_locale}/update-payment (route
sylius_mollie_shop_payment_webhook) accepts two independent, attacker-controlled
parameters: id (the Mollie payment ID, verified against Mollie's API) and orderId (the
Sylius order ID, read directly from the database). The handler never verifies that the
Mollie payment belongs to the referenced order.
An unauthenticated attacker who holds any valid paid Mollie payment ID, for example
from a EUR 1 order they placed themselves, can submit it together with any victim
orderId. The victim's order payment is then transitioned to completed (or any other
Mollie-derived state) without any funds being transferred for that order. Sylius order IDs
are sequential integers, and the endpoint requires no authentication, CSRF token or rate
limiting, so the attack scales trivially across all pending orders.
Patches
Fixed in versions 2.2.8, 3.2.4 and 3.3.1. The webhook now binds the payment to
the order: it reads the Mollie payment ID stored server-side for that order when the payment
was created and compares it to the incoming Mollie payment ID. On mismatch the request is
acknowledged with HTTP 200 and no state change is applied. HTTP 200 is intentional,
because Mollie retries the webhook on any non-2xx response.
The stored ID lives in one of two places depending on the checkout flow, and the fix reads
both of them (mirroring CaptureAction):
payment.getDetails()['payment_mollie_id'] for the standard Shop API and Apple Pay Direct
flows, stored in CreatePaymentAction.
order.getMolliePaymentId() for the QR-code flow, which stores the ID on the order itself
(QrCodeAction).
Reading only the payment details would reject legitimate QR-code payments, because their
payment details carry no payment_mollie_id, so both sources must be consulted.
Workarounds
If you cannot upgrade immediately, patch the vulnerability at the project level by
decorating the plugin's webhook controller. The decorator checks that the incoming Mollie
id matches the id stored for that order before handing over to the original controller,
so no plugin behaviour (state machine, logging) is lost and no extra Mollie API call is
made. Works on both 2.2 and 3.x.
Step 1. Create the decorator
Create src/Controller/Mollie/SecurePaymentWebhookController.php in your Sylius project:
<?php
declare(strict_types=1);
namespace App\Controller\Mollie;
use Sylius\Component\Core\Model\OrderInterface;
use Sylius\Component\Order\Repository\OrderRepositoryInterface;
use Sylius\MolliePlugin\Controller\Shop\PaymentWebhookController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
final class SecurePaymentWebhookController
{
public function __construct(
private readonly PaymentWebhookController $inner,
private readonly OrderRepositoryInterface $orderRepository,
) {
}
public function __invoke(Request $request): Response
{
$orderId = $request->get('orderId');
$molliePaymentId = $request->get('id');
if (null === $orderId || null === $molliePaymentId) {
return ($this->inner)($request);
}
/** @var OrderInterface|null $order */
$order = $this->orderRepository->findOneBy(['id' => $orderId]);
if (null === $order) {
return ($this->inner)($request);
}
$storedMollieId = $this->resolveStoredMollieId($order);
// Reject any webhook whose Mollie id does not match the one stored for this order.
// 200 is intentional: Mollie retries on any non-2xx response.
if (null === $storedMollieId || $storedMollieId !== (string) $molliePaymentId) {
return new JsonResponse(null, Response::HTTP_OK);
}
return ($this->inner)($request);
}
private function resolveStoredMollieId(OrderInterface $order): ?string
{
$payment = $order->getLastPayment();
$fromDetails = $payment?->getDetails()['payment_mollie_id'] ?? null;
if (null !== $fromDetails && '' !== $fromDetails) {
return (string) $fromDetails;
}
// QR-code flow stores the Mollie id on the order itself.
if (method_exists($order, 'getMolliePaymentId')) {
$fromOrder = $order->getMolliePaymentId();
if (null !== $fromOrder && '' !== $fromOrder) {
return (string) $fromOrder;
}
}
return null;
}
}
decorates: keeps the original service ID, so the route
_controller: sylius_mollie.controller.shop.payment_webhook keeps working with no route
changes. @.inner is the original plugin controller.
Sylius Mollie Plugin has unauthenticated IDOR that leaks order token and customer PII
6.5
/ 10
Medium
Network
Low
None
None
Unchanged
Low
None
Low
Impact
Two unauthenticated Mollie shop endpoints look up orders by a sequential integer orderId
with no ownership or session check. Chained, they expose customer PII.
GET /{_locale}/thank-you (PageRedirectController::thankYouAction, route
sylius_mollie_shop_thank_you_page_redirect) loads the order with findOneBy(['id' => $orderId])
and returns a 302 whose Location header carries that order's tokenValue. Any orderId
thus yields that order's token. A non-existent id dereferences null and returns a 500. The
handler also writes the raw orderId into the session.
GET /{_locale}/get-code (QrCodeAction::fetchQrCodeFromOrder, route
sylius_mollie_shop_get_qr_code) runs the same lookup and returns the order's QR code and id
as JSON, ignoring the session cart; this is where the front-end got the integer id. A bad id
500s here too.
That tokenValue is the order's only access control. Passed to the Sylius core page
GET /{_locale}/register-after-checkout/{tokenValue} it returns a form pre-filled with the
customer's first name, last name and email. The full attack: enumerate orderId, read the
token from the redirect, read the PII, at roughly a 1-in-71 hit rate for guest orders.
register-after-checkout is Sylius core, not the plugin, and trusts the token by design, so
the leak is what must be fixed.
None of the plugin endpoints require a login, session or CSRF token.
Patches
Fixed in 2.2.8, 3.2.4 and 3.3.1.
Workarounds
If you cannot upgrade immediately, patch both endpoints at the project level by decorating
the plugin controllers. The decorators enforce ownership before delegating to the original
controller, so no plugin behaviour is lost. They keep the original orderId request contract,
so no front-end or asset changes are required. Works on both 2.2 and 3.x.
Step 1. Decorate the QR code controller
Create src/Controller/Mollie/SecureQrCodeAction.php in your Sylius project:
<?php
declare(strict_types=1);
namespace App\Controller\Mollie;
use Sylius\Component\Order\Context\CartContextInterface;
use Sylius\Component\Order\Context\CartNotFoundException;
use Sylius\MolliePlugin\Controller\Shop\QrCodeAction;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
final class SecureQrCodeAction
{
private const OWNED_ORDER_IDS_SESSION_KEY = 'sylius_mollie.owned_order_ids';
public function __construct(
private readonly QrCodeAction $inner,
private readonly CartContextInterface $cartContext,
) {
}
public function fetchQrCodeFromOrder(Request $request): JsonResponse
{
$orderId = $request->get('orderId');
try {
$cart = $this->cartContext->getCart();
} catch (CartNotFoundException) {
$cart = null;
}
if (null !== $orderId && (null === $cart || (string) $cart->getId() !== (string) $orderId)) {
return new JsonResponse([], Response::HTTP_FORBIDDEN);
}
if (null !== $cart && null !== $cart->getId() && $request->hasSession()) {
$session = $request->getSession();
$ownedIds = $session->get(self::OWNED_ORDER_IDS_SESSION_KEY, []);
$ownedIds[(string) $cart->getId()] = true;
$session->set(self::OWNED_ORDER_IDS_SESSION_KEY, $ownedIds);
}
return $this->inner->fetchQrCodeFromOrder($request);
}
public function createPayment(Request $request): Response
{
return $this->inner->createPayment($request);
}
public function removeQrCodeFromOrder(Request $request): JsonResponse
{
return $this->inner->removeQrCodeFromOrder($request);
}
}
Both decorators keep @.inner and only add an ownership check on orderId before handing
the request to the original action, so createPayment, removeQrCodeFromOrder and the
thank-you redirect all keep their original behaviour and the front-end contract is unchanged.
Sylius Mollie Plugin vulnerable to payment status forgery via the payment webhook
7.5
/ 10
High
Network
Low
None
None
Unchanged
None
High
None
Impact
The shop payment webhook POST /{_locale}/update-payment (route
sylius_mollie_shop_payment_webhook) accepts two independent, attacker-controlled
parameters: id (the Mollie payment ID, verified against Mollie's API) and orderId (the
Sylius order ID, read directly from the database). The handler never verifies that the
Mollie payment belongs to the referenced order.
An unauthenticated attacker who holds any valid paid Mollie payment ID, for example
from a EUR 1 order they placed themselves, can submit it together with any victim
orderId. The victim's order payment is then transitioned to completed (or any other
Mollie-derived state) without any funds being transferred for that order. Sylius order IDs
are sequential integers, and the endpoint requires no authentication, CSRF token or rate
limiting, so the attack scales trivially across all pending orders.
Patches
Fixed in versions 2.2.8, 3.2.4 and 3.3.1. The webhook now binds the payment to
the order: it reads the Mollie payment ID stored server-side for that order when the payment
was created and compares it to the incoming Mollie payment ID. On mismatch the request is
acknowledged with HTTP 200 and no state change is applied. HTTP 200 is intentional,
because Mollie retries the webhook on any non-2xx response.
The stored ID lives in one of two places depending on the checkout flow, and the fix reads
both of them (mirroring CaptureAction):
payment.getDetails()['payment_mollie_id'] for the standard Shop API and Apple Pay Direct
flows, stored in CreatePaymentAction.
order.getMolliePaymentId() for the QR-code flow, which stores the ID on the order itself
(QrCodeAction).
Reading only the payment details would reject legitimate QR-code payments, because their
payment details carry no payment_mollie_id, so both sources must be consulted.
Workarounds
If you cannot upgrade immediately, patch the vulnerability at the project level by
decorating the plugin's webhook controller. The decorator checks that the incoming Mollie
id matches the id stored for that order before handing over to the original controller,
so no plugin behaviour (state machine, logging) is lost and no extra Mollie API call is
made. Works on both 2.2 and 3.x.
Step 1. Create the decorator
Create src/Controller/Mollie/SecurePaymentWebhookController.php in your Sylius project:
<?php
declare(strict_types=1);
namespace App\Controller\Mollie;
use Sylius\Component\Core\Model\OrderInterface;
use Sylius\Component\Order\Repository\OrderRepositoryInterface;
use Sylius\MolliePlugin\Controller\Shop\PaymentWebhookController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
final class SecurePaymentWebhookController
{
public function __construct(
private readonly PaymentWebhookController $inner,
private readonly OrderRepositoryInterface $orderRepository,
) {
}
public function __invoke(Request $request): Response
{
$orderId = $request->get('orderId');
$molliePaymentId = $request->get('id');
if (null === $orderId || null === $molliePaymentId) {
return ($this->inner)($request);
}
/** @var OrderInterface|null $order */
$order = $this->orderRepository->findOneBy(['id' => $orderId]);
if (null === $order) {
return ($this->inner)($request);
}
$storedMollieId = $this->resolveStoredMollieId($order);
// Reject any webhook whose Mollie id does not match the one stored for this order.
// 200 is intentional: Mollie retries on any non-2xx response.
if (null === $storedMollieId || $storedMollieId !== (string) $molliePaymentId) {
return new JsonResponse(null, Response::HTTP_OK);
}
return ($this->inner)($request);
}
private function resolveStoredMollieId(OrderInterface $order): ?string
{
$payment = $order->getLastPayment();
$fromDetails = $payment?->getDetails()['payment_mollie_id'] ?? null;
if (null !== $fromDetails && '' !== $fromDetails) {
return (string) $fromDetails;
}
// QR-code flow stores the Mollie id on the order itself.
if (method_exists($order, 'getMolliePaymentId')) {
$fromOrder = $order->getMolliePaymentId();
if (null !== $fromOrder && '' !== $fromOrder) {
return (string) $fromOrder;
}
}
return null;
}
}
decorates: keeps the original service ID, so the route
_controller: sylius_mollie.controller.shop.payment_webhook keeps working with no route
changes. @.inner is the original plugin controller.
Sylius Mollie Plugin has unauthenticated IDOR that leaks order token and customer PII
6.5
/ 10
Medium
Network
Low
None
None
Unchanged
Low
None
Low
Impact
Two unauthenticated Mollie shop endpoints look up orders by a sequential integer orderId
with no ownership or session check. Chained, they expose customer PII.
GET /{_locale}/thank-you (PageRedirectController::thankYouAction, route
sylius_mollie_shop_thank_you_page_redirect) loads the order with findOneBy(['id' => $orderId])
and returns a 302 whose Location header carries that order's tokenValue. Any orderId
thus yields that order's token. A non-existent id dereferences null and returns a 500. The
handler also writes the raw orderId into the session.
GET /{_locale}/get-code (QrCodeAction::fetchQrCodeFromOrder, route
sylius_mollie_shop_get_qr_code) runs the same lookup and returns the order's QR code and id
as JSON, ignoring the session cart; this is where the front-end got the integer id. A bad id
500s here too.
That tokenValue is the order's only access control. Passed to the Sylius core page
GET /{_locale}/register-after-checkout/{tokenValue} it returns a form pre-filled with the
customer's first name, last name and email. The full attack: enumerate orderId, read the
token from the redirect, read the PII, at roughly a 1-in-71 hit rate for guest orders.
register-after-checkout is Sylius core, not the plugin, and trusts the token by design, so
the leak is what must be fixed.
None of the plugin endpoints require a login, session or CSRF token.
Patches
Fixed in 2.2.8, 3.2.4 and 3.3.1.
Workarounds
If you cannot upgrade immediately, patch both endpoints at the project level by decorating
the plugin controllers. The decorators enforce ownership before delegating to the original
controller, so no plugin behaviour is lost. They keep the original orderId request contract,
so no front-end or asset changes are required. Works on both 2.2 and 3.x.
Step 1. Decorate the QR code controller
Create src/Controller/Mollie/SecureQrCodeAction.php in your Sylius project:
<?php
declare(strict_types=1);
namespace App\Controller\Mollie;
use Sylius\Component\Order\Context\CartContextInterface;
use Sylius\Component\Order\Context\CartNotFoundException;
use Sylius\MolliePlugin\Controller\Shop\QrCodeAction;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
final class SecureQrCodeAction
{
private const OWNED_ORDER_IDS_SESSION_KEY = 'sylius_mollie.owned_order_ids';
public function __construct(
private readonly QrCodeAction $inner,
private readonly CartContextInterface $cartContext,
) {
}
public function fetchQrCodeFromOrder(Request $request): JsonResponse
{
$orderId = $request->get('orderId');
try {
$cart = $this->cartContext->getCart();
} catch (CartNotFoundException) {
$cart = null;
}
if (null !== $orderId && (null === $cart || (string) $cart->getId() !== (string) $orderId)) {
return new JsonResponse([], Response::HTTP_FORBIDDEN);
}
if (null !== $cart && null !== $cart->getId() && $request->hasSession()) {
$session = $request->getSession();
$ownedIds = $session->get(self::OWNED_ORDER_IDS_SESSION_KEY, []);
$ownedIds[(string) $cart->getId()] = true;
$session->set(self::OWNED_ORDER_IDS_SESSION_KEY, $ownedIds);
}
return $this->inner->fetchQrCodeFromOrder($request);
}
public function createPayment(Request $request): Response
{
return $this->inner->createPayment($request);
}
public function removeQrCodeFromOrder(Request $request): JsonResponse
{
return $this->inner->removeQrCodeFromOrder($request);
}
}
Both decorators keep @.inner and only add an ownership check on orderId before handing
the request to the original action, so createPayment, removeQrCodeFromOrder and the
thank-you redirect all keep their original behaviour and the front-end contract is unchanged.
Sylius Mollie Plugin vulnerable to payment status forgery via the payment webhook
7.5
/ 10
High
Network
Low
None
None
Unchanged
None
High
None
Impact
The shop payment webhook POST /{_locale}/update-payment (route
sylius_mollie_shop_payment_webhook) accepts two independent, attacker-controlled
parameters: id (the Mollie payment ID, verified against Mollie's API) and orderId (the
Sylius order ID, read directly from the database). The handler never verifies that the
Mollie payment belongs to the referenced order.
An unauthenticated attacker who holds any valid paid Mollie payment ID, for example
from a EUR 1 order they placed themselves, can submit it together with any victim
orderId. The victim's order payment is then transitioned to completed (or any other
Mollie-derived state) without any funds being transferred for that order. Sylius order IDs
are sequential integers, and the endpoint requires no authentication, CSRF token or rate
limiting, so the attack scales trivially across all pending orders.
Patches
Fixed in versions 2.2.8, 3.2.4 and 3.3.1. The webhook now binds the payment to
the order: it reads the Mollie payment ID stored server-side for that order when the payment
was created and compares it to the incoming Mollie payment ID. On mismatch the request is
acknowledged with HTTP 200 and no state change is applied. HTTP 200 is intentional,
because Mollie retries the webhook on any non-2xx response.
The stored ID lives in one of two places depending on the checkout flow, and the fix reads
both of them (mirroring CaptureAction):
payment.getDetails()['payment_mollie_id'] for the standard Shop API and Apple Pay Direct
flows, stored in CreatePaymentAction.
order.getMolliePaymentId() for the QR-code flow, which stores the ID on the order itself
(QrCodeAction).
Reading only the payment details would reject legitimate QR-code payments, because their
payment details carry no payment_mollie_id, so both sources must be consulted.
Workarounds
If you cannot upgrade immediately, patch the vulnerability at the project level by
decorating the plugin's webhook controller. The decorator checks that the incoming Mollie
id matches the id stored for that order before handing over to the original controller,
so no plugin behaviour (state machine, logging) is lost and no extra Mollie API call is
made. Works on both 2.2 and 3.x.
Step 1. Create the decorator
Create src/Controller/Mollie/SecurePaymentWebhookController.php in your Sylius project:
<?php
declare(strict_types=1);
namespace App\Controller\Mollie;
use Sylius\Component\Core\Model\OrderInterface;
use Sylius\Component\Order\Repository\OrderRepositoryInterface;
use Sylius\MolliePlugin\Controller\Shop\PaymentWebhookController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
final class SecurePaymentWebhookController
{
public function __construct(
private readonly PaymentWebhookController $inner,
private readonly OrderRepositoryInterface $orderRepository,
) {
}
public function __invoke(Request $request): Response
{
$orderId = $request->get('orderId');
$molliePaymentId = $request->get('id');
if (null === $orderId || null === $molliePaymentId) {
return ($this->inner)($request);
}
/** @var OrderInterface|null $order */
$order = $this->orderRepository->findOneBy(['id' => $orderId]);
if (null === $order) {
return ($this->inner)($request);
}
$storedMollieId = $this->resolveStoredMollieId($order);
// Reject any webhook whose Mollie id does not match the one stored for this order.
// 200 is intentional: Mollie retries on any non-2xx response.
if (null === $storedMollieId || $storedMollieId !== (string) $molliePaymentId) {
return new JsonResponse(null, Response::HTTP_OK);
}
return ($this->inner)($request);
}
private function resolveStoredMollieId(OrderInterface $order): ?string
{
$payment = $order->getLastPayment();
$fromDetails = $payment?->getDetails()['payment_mollie_id'] ?? null;
if (null !== $fromDetails && '' !== $fromDetails) {
return (string) $fromDetails;
}
// QR-code flow stores the Mollie id on the order itself.
if (method_exists($order, 'getMolliePaymentId')) {
$fromOrder = $order->getMolliePaymentId();
if (null !== $fromOrder && '' !== $fromOrder) {
return (string) $fromOrder;
}
}
return null;
}
}
decorates: keeps the original service ID, so the route
_controller: sylius_mollie.controller.shop.payment_webhook keeps working with no route
changes. @.inner is the original plugin controller.
Sylius Mollie Plugin has unauthenticated IDOR that leaks order token and customer PII
6.5
/ 10
Medium
Network
Low
None
None
Unchanged
Low
None
Low
Impact
Two unauthenticated Mollie shop endpoints look up orders by a sequential integer orderId
with no ownership or session check. Chained, they expose customer PII.
GET /{_locale}/thank-you (PageRedirectController::thankYouAction, route
sylius_mollie_shop_thank_you_page_redirect) loads the order with findOneBy(['id' => $orderId])
and returns a 302 whose Location header carries that order's tokenValue. Any orderId
thus yields that order's token. A non-existent id dereferences null and returns a 500. The
handler also writes the raw orderId into the session.
GET /{_locale}/get-code (QrCodeAction::fetchQrCodeFromOrder, route
sylius_mollie_shop_get_qr_code) runs the same lookup and returns the order's QR code and id
as JSON, ignoring the session cart; this is where the front-end got the integer id. A bad id
500s here too.
That tokenValue is the order's only access control. Passed to the Sylius core page
GET /{_locale}/register-after-checkout/{tokenValue} it returns a form pre-filled with the
customer's first name, last name and email. The full attack: enumerate orderId, read the
token from the redirect, read the PII, at roughly a 1-in-71 hit rate for guest orders.
register-after-checkout is Sylius core, not the plugin, and trusts the token by design, so
the leak is what must be fixed.
None of the plugin endpoints require a login, session or CSRF token.
Patches
Fixed in 2.2.8, 3.2.4 and 3.3.1.
Workarounds
If you cannot upgrade immediately, patch both endpoints at the project level by decorating
the plugin controllers. The decorators enforce ownership before delegating to the original
controller, so no plugin behaviour is lost. They keep the original orderId request contract,
so no front-end or asset changes are required. Works on both 2.2 and 3.x.
Step 1. Decorate the QR code controller
Create src/Controller/Mollie/SecureQrCodeAction.php in your Sylius project:
<?php
declare(strict_types=1);
namespace App\Controller\Mollie;
use Sylius\Component\Order\Context\CartContextInterface;
use Sylius\Component\Order\Context\CartNotFoundException;
use Sylius\MolliePlugin\Controller\Shop\QrCodeAction;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
final class SecureQrCodeAction
{
private const OWNED_ORDER_IDS_SESSION_KEY = 'sylius_mollie.owned_order_ids';
public function __construct(
private readonly QrCodeAction $inner,
private readonly CartContextInterface $cartContext,
) {
}
public function fetchQrCodeFromOrder(Request $request): JsonResponse
{
$orderId = $request->get('orderId');
try {
$cart = $this->cartContext->getCart();
} catch (CartNotFoundException) {
$cart = null;
}
if (null !== $orderId && (null === $cart || (string) $cart->getId() !== (string) $orderId)) {
return new JsonResponse([], Response::HTTP_FORBIDDEN);
}
if (null !== $cart && null !== $cart->getId() && $request->hasSession()) {
$session = $request->getSession();
$ownedIds = $session->get(self::OWNED_ORDER_IDS_SESSION_KEY, []);
$ownedIds[(string) $cart->getId()] = true;
$session->set(self::OWNED_ORDER_IDS_SESSION_KEY, $ownedIds);
}
return $this->inner->fetchQrCodeFromOrder($request);
}
public function createPayment(Request $request): Response
{
return $this->inner->createPayment($request);
}
public function removeQrCodeFromOrder(Request $request): JsonResponse
{
return $this->inner->removeQrCodeFromOrder($request);
}
}
Both decorators keep @.inner and only add an ownership check on orderId before handing
the request to the original action, so createPayment, removeQrCodeFromOrder and the
thank-you redirect all keep their original behaviour and the front-end contract is unchanged.
Sylius Mollie Plugin vulnerable to payment status forgery via the payment webhook
7.5
/ 10
High
Network
Low
None
None
Unchanged
None
High
None
Impact
The shop payment webhook POST /{_locale}/update-payment (route
sylius_mollie_shop_payment_webhook) accepts two independent, attacker-controlled
parameters: id (the Mollie payment ID, verified against Mollie's API) and orderId (the
Sylius order ID, read directly from the database). The handler never verifies that the
Mollie payment belongs to the referenced order.
An unauthenticated attacker who holds any valid paid Mollie payment ID, for example
from a EUR 1 order they placed themselves, can submit it together with any victim
orderId. The victim's order payment is then transitioned to completed (or any other
Mollie-derived state) without any funds being transferred for that order. Sylius order IDs
are sequential integers, and the endpoint requires no authentication, CSRF token or rate
limiting, so the attack scales trivially across all pending orders.
Patches
Fixed in versions 2.2.8, 3.2.4 and 3.3.1. The webhook now binds the payment to
the order: it reads the Mollie payment ID stored server-side for that order when the payment
was created and compares it to the incoming Mollie payment ID. On mismatch the request is
acknowledged with HTTP 200 and no state change is applied. HTTP 200 is intentional,
because Mollie retries the webhook on any non-2xx response.
The stored ID lives in one of two places depending on the checkout flow, and the fix reads
both of them (mirroring CaptureAction):
payment.getDetails()['payment_mollie_id'] for the standard Shop API and Apple Pay Direct
flows, stored in CreatePaymentAction.
order.getMolliePaymentId() for the QR-code flow, which stores the ID on the order itself
(QrCodeAction).
Reading only the payment details would reject legitimate QR-code payments, because their
payment details carry no payment_mollie_id, so both sources must be consulted.
Workarounds
If you cannot upgrade immediately, patch the vulnerability at the project level by
decorating the plugin's webhook controller. The decorator checks that the incoming Mollie
id matches the id stored for that order before handing over to the original controller,
so no plugin behaviour (state machine, logging) is lost and no extra Mollie API call is
made. Works on both 2.2 and 3.x.
Step 1. Create the decorator
Create src/Controller/Mollie/SecurePaymentWebhookController.php in your Sylius project:
<?php
declare(strict_types=1);
namespace App\Controller\Mollie;
use Sylius\Component\Core\Model\OrderInterface;
use Sylius\Component\Order\Repository\OrderRepositoryInterface;
use Sylius\MolliePlugin\Controller\Shop\PaymentWebhookController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
final class SecurePaymentWebhookController
{
public function __construct(
private readonly PaymentWebhookController $inner,
private readonly OrderRepositoryInterface $orderRepository,
) {
}
public function __invoke(Request $request): Response
{
$orderId = $request->get('orderId');
$molliePaymentId = $request->get('id');
if (null === $orderId || null === $molliePaymentId) {
return ($this->inner)($request);
}
/** @var OrderInterface|null $order */
$order = $this->orderRepository->findOneBy(['id' => $orderId]);
if (null === $order) {
return ($this->inner)($request);
}
$storedMollieId = $this->resolveStoredMollieId($order);
// Reject any webhook whose Mollie id does not match the one stored for this order.
// 200 is intentional: Mollie retries on any non-2xx response.
if (null === $storedMollieId || $storedMollieId !== (string) $molliePaymentId) {
return new JsonResponse(null, Response::HTTP_OK);
}
return ($this->inner)($request);
}
private function resolveStoredMollieId(OrderInterface $order): ?string
{
$payment = $order->getLastPayment();
$fromDetails = $payment?->getDetails()['payment_mollie_id'] ?? null;
if (null !== $fromDetails && '' !== $fromDetails) {
return (string) $fromDetails;
}
// QR-code flow stores the Mollie id on the order itself.
if (method_exists($order, 'getMolliePaymentId')) {
$fromOrder = $order->getMolliePaymentId();
if (null !== $fromOrder && '' !== $fromOrder) {
return (string) $fromOrder;
}
}
return null;
}
}
decorates: keeps the original service ID, so the route
_controller: sylius_mollie.controller.shop.payment_webhook keeps working with no route
changes. @.inner is the original plugin controller.
Sylius Mollie Plugin has unauthenticated IDOR that leaks order token and customer PII
6.5
/ 10
Medium
Network
Low
None
None
Unchanged
Low
None
Low
Impact
Two unauthenticated Mollie shop endpoints look up orders by a sequential integer orderId
with no ownership or session check. Chained, they expose customer PII.
GET /{_locale}/thank-you (PageRedirectController::thankYouAction, route
sylius_mollie_shop_thank_you_page_redirect) loads the order with findOneBy(['id' => $orderId])
and returns a 302 whose Location header carries that order's tokenValue. Any orderId
thus yields that order's token. A non-existent id dereferences null and returns a 500. The
handler also writes the raw orderId into the session.
GET /{_locale}/get-code (QrCodeAction::fetchQrCodeFromOrder, route
sylius_mollie_shop_get_qr_code) runs the same lookup and returns the order's QR code and id
as JSON, ignoring the session cart; this is where the front-end got the integer id. A bad id
500s here too.
That tokenValue is the order's only access control. Passed to the Sylius core page
GET /{_locale}/register-after-checkout/{tokenValue} it returns a form pre-filled with the
customer's first name, last name and email. The full attack: enumerate orderId, read the
token from the redirect, read the PII, at roughly a 1-in-71 hit rate for guest orders.
register-after-checkout is Sylius core, not the plugin, and trusts the token by design, so
the leak is what must be fixed.
None of the plugin endpoints require a login, session or CSRF token.
Patches
Fixed in 2.2.8, 3.2.4 and 3.3.1.
Workarounds
If you cannot upgrade immediately, patch both endpoints at the project level by decorating
the plugin controllers. The decorators enforce ownership before delegating to the original
controller, so no plugin behaviour is lost. They keep the original orderId request contract,
so no front-end or asset changes are required. Works on both 2.2 and 3.x.
Step 1. Decorate the QR code controller
Create src/Controller/Mollie/SecureQrCodeAction.php in your Sylius project:
<?php
declare(strict_types=1);
namespace App\Controller\Mollie;
use Sylius\Component\Order\Context\CartContextInterface;
use Sylius\Component\Order\Context\CartNotFoundException;
use Sylius\MolliePlugin\Controller\Shop\QrCodeAction;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
final class SecureQrCodeAction
{
private const OWNED_ORDER_IDS_SESSION_KEY = 'sylius_mollie.owned_order_ids';
public function __construct(
private readonly QrCodeAction $inner,
private readonly CartContextInterface $cartContext,
) {
}
public function fetchQrCodeFromOrder(Request $request): JsonResponse
{
$orderId = $request->get('orderId');
try {
$cart = $this->cartContext->getCart();
} catch (CartNotFoundException) {
$cart = null;
}
if (null !== $orderId && (null === $cart || (string) $cart->getId() !== (string) $orderId)) {
return new JsonResponse([], Response::HTTP_FORBIDDEN);
}
if (null !== $cart && null !== $cart->getId() && $request->hasSession()) {
$session = $request->getSession();
$ownedIds = $session->get(self::OWNED_ORDER_IDS_SESSION_KEY, []);
$ownedIds[(string) $cart->getId()] = true;
$session->set(self::OWNED_ORDER_IDS_SESSION_KEY, $ownedIds);
}
return $this->inner->fetchQrCodeFromOrder($request);
}
public function createPayment(Request $request): Response
{
return $this->inner->createPayment($request);
}
public function removeQrCodeFromOrder(Request $request): JsonResponse
{
return $this->inner->removeQrCodeFromOrder($request);
}
}
Both decorators keep @.inner and only add an ownership check on orderId before handing
the request to the original action, so createPayment, removeQrCodeFromOrder and the
thank-you redirect all keep their original behaviour and the front-end contract is unchanged.
Sylius Mollie Plugin vulnerable to payment status forgery via the payment webhook
7.5
/ 10
High
Network
Low
None
None
Unchanged
None
High
None
Impact
The shop payment webhook POST /{_locale}/update-payment (route
sylius_mollie_shop_payment_webhook) accepts two independent, attacker-controlled
parameters: id (the Mollie payment ID, verified against Mollie's API) and orderId (the
Sylius order ID, read directly from the database). The handler never verifies that the
Mollie payment belongs to the referenced order.
An unauthenticated attacker who holds any valid paid Mollie payment ID, for example
from a EUR 1 order they placed themselves, can submit it together with any victim
orderId. The victim's order payment is then transitioned to completed (or any other
Mollie-derived state) without any funds being transferred for that order. Sylius order IDs
are sequential integers, and the endpoint requires no authentication, CSRF token or rate
limiting, so the attack scales trivially across all pending orders.
Patches
Fixed in versions 2.2.8, 3.2.4 and 3.3.1. The webhook now binds the payment to
the order: it reads the Mollie payment ID stored server-side for that order when the payment
was created and compares it to the incoming Mollie payment ID. On mismatch the request is
acknowledged with HTTP 200 and no state change is applied. HTTP 200 is intentional,
because Mollie retries the webhook on any non-2xx response.
The stored ID lives in one of two places depending on the checkout flow, and the fix reads
both of them (mirroring CaptureAction):
payment.getDetails()['payment_mollie_id'] for the standard Shop API and Apple Pay Direct
flows, stored in CreatePaymentAction.
order.getMolliePaymentId() for the QR-code flow, which stores the ID on the order itself
(QrCodeAction).
Reading only the payment details would reject legitimate QR-code payments, because their
payment details carry no payment_mollie_id, so both sources must be consulted.
Workarounds
If you cannot upgrade immediately, patch the vulnerability at the project level by
decorating the plugin's webhook controller. The decorator checks that the incoming Mollie
id matches the id stored for that order before handing over to the original controller,
so no plugin behaviour (state machine, logging) is lost and no extra Mollie API call is
made. Works on both 2.2 and 3.x.
Step 1. Create the decorator
Create src/Controller/Mollie/SecurePaymentWebhookController.php in your Sylius project:
<?php
declare(strict_types=1);
namespace App\Controller\Mollie;
use Sylius\Component\Core\Model\OrderInterface;
use Sylius\Component\Order\Repository\OrderRepositoryInterface;
use Sylius\MolliePlugin\Controller\Shop\PaymentWebhookController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
final class SecurePaymentWebhookController
{
public function __construct(
private readonly PaymentWebhookController $inner,
private readonly OrderRepositoryInterface $orderRepository,
) {
}
public function __invoke(Request $request): Response
{
$orderId = $request->get('orderId');
$molliePaymentId = $request->get('id');
if (null === $orderId || null === $molliePaymentId) {
return ($this->inner)($request);
}
/** @var OrderInterface|null $order */
$order = $this->orderRepository->findOneBy(['id' => $orderId]);
if (null === $order) {
return ($this->inner)($request);
}
$storedMollieId = $this->resolveStoredMollieId($order);
// Reject any webhook whose Mollie id does not match the one stored for this order.
// 200 is intentional: Mollie retries on any non-2xx response.
if (null === $storedMollieId || $storedMollieId !== (string) $molliePaymentId) {
return new JsonResponse(null, Response::HTTP_OK);
}
return ($this->inner)($request);
}
private function resolveStoredMollieId(OrderInterface $order): ?string
{
$payment = $order->getLastPayment();
$fromDetails = $payment?->getDetails()['payment_mollie_id'] ?? null;
if (null !== $fromDetails && '' !== $fromDetails) {
return (string) $fromDetails;
}
// QR-code flow stores the Mollie id on the order itself.
if (method_exists($order, 'getMolliePaymentId')) {
$fromOrder = $order->getMolliePaymentId();
if (null !== $fromOrder && '' !== $fromOrder) {
return (string) $fromOrder;
}
}
return null;
}
}
decorates: keeps the original service ID, so the route
_controller: sylius_mollie.controller.shop.payment_webhook keeps working with no route
changes. @.inner is the original plugin controller.
Sylius Mollie Plugin has unauthenticated IDOR that leaks order token and customer PII
6.5
/ 10
Medium
Network
Low
None
None
Unchanged
Low
None
Low
Impact
Two unauthenticated Mollie shop endpoints look up orders by a sequential integer orderId
with no ownership or session check. Chained, they expose customer PII.
GET /{_locale}/thank-you (PageRedirectController::thankYouAction, route
sylius_mollie_shop_thank_you_page_redirect) loads the order with findOneBy(['id' => $orderId])
and returns a 302 whose Location header carries that order's tokenValue. Any orderId
thus yields that order's token. A non-existent id dereferences null and returns a 500. The
handler also writes the raw orderId into the session.
GET /{_locale}/get-code (QrCodeAction::fetchQrCodeFromOrder, route
sylius_mollie_shop_get_qr_code) runs the same lookup and returns the order's QR code and id
as JSON, ignoring the session cart; this is where the front-end got the integer id. A bad id
500s here too.
That tokenValue is the order's only access control. Passed to the Sylius core page
GET /{_locale}/register-after-checkout/{tokenValue} it returns a form pre-filled with the
customer's first name, last name and email. The full attack: enumerate orderId, read the
token from the redirect, read the PII, at roughly a 1-in-71 hit rate for guest orders.
register-after-checkout is Sylius core, not the plugin, and trusts the token by design, so
the leak is what must be fixed.
None of the plugin endpoints require a login, session or CSRF token.
Patches
Fixed in 2.2.8, 3.2.4 and 3.3.1.
Workarounds
If you cannot upgrade immediately, patch both endpoints at the project level by decorating
the plugin controllers. The decorators enforce ownership before delegating to the original
controller, so no plugin behaviour is lost. They keep the original orderId request contract,
so no front-end or asset changes are required. Works on both 2.2 and 3.x.
Step 1. Decorate the QR code controller
Create src/Controller/Mollie/SecureQrCodeAction.php in your Sylius project:
<?php
declare(strict_types=1);
namespace App\Controller\Mollie;
use Sylius\Component\Order\Context\CartContextInterface;
use Sylius\Component\Order\Context\CartNotFoundException;
use Sylius\MolliePlugin\Controller\Shop\QrCodeAction;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
final class SecureQrCodeAction
{
private const OWNED_ORDER_IDS_SESSION_KEY = 'sylius_mollie.owned_order_ids';
public function __construct(
private readonly QrCodeAction $inner,
private readonly CartContextInterface $cartContext,
) {
}
public function fetchQrCodeFromOrder(Request $request): JsonResponse
{
$orderId = $request->get('orderId');
try {
$cart = $this->cartContext->getCart();
} catch (CartNotFoundException) {
$cart = null;
}
if (null !== $orderId && (null === $cart || (string) $cart->getId() !== (string) $orderId)) {
return new JsonResponse([], Response::HTTP_FORBIDDEN);
}
if (null !== $cart && null !== $cart->getId() && $request->hasSession()) {
$session = $request->getSession();
$ownedIds = $session->get(self::OWNED_ORDER_IDS_SESSION_KEY, []);
$ownedIds[(string) $cart->getId()] = true;
$session->set(self::OWNED_ORDER_IDS_SESSION_KEY, $ownedIds);
}
return $this->inner->fetchQrCodeFromOrder($request);
}
public function createPayment(Request $request): Response
{
return $this->inner->createPayment($request);
}
public function removeQrCodeFromOrder(Request $request): JsonResponse
{
return $this->inner->removeQrCodeFromOrder($request);
}
}
Both decorators keep @.inner and only add an ownership check on orderId before handing
the request to the original action, so createPayment, removeQrCodeFromOrder and the
thank-you redirect all keep their original behaviour and the front-end contract is unchanged.
Sylius Mollie Plugin vulnerable to payment status forgery via the payment webhook
7.5
/ 10
High
Network
Low
None
None
Unchanged
None
High
None
Impact
The shop payment webhook POST /{_locale}/update-payment (route
sylius_mollie_shop_payment_webhook) accepts two independent, attacker-controlled
parameters: id (the Mollie payment ID, verified against Mollie's API) and orderId (the
Sylius order ID, read directly from the database). The handler never verifies that the
Mollie payment belongs to the referenced order.
An unauthenticated attacker who holds any valid paid Mollie payment ID, for example
from a EUR 1 order they placed themselves, can submit it together with any victim
orderId. The victim's order payment is then transitioned to completed (or any other
Mollie-derived state) without any funds being transferred for that order. Sylius order IDs
are sequential integers, and the endpoint requires no authentication, CSRF token or rate
limiting, so the attack scales trivially across all pending orders.
Patches
Fixed in versions 2.2.8, 3.2.4 and 3.3.1. The webhook now binds the payment to
the order: it reads the Mollie payment ID stored server-side for that order when the payment
was created and compares it to the incoming Mollie payment ID. On mismatch the request is
acknowledged with HTTP 200 and no state change is applied. HTTP 200 is intentional,
because Mollie retries the webhook on any non-2xx response.
The stored ID lives in one of two places depending on the checkout flow, and the fix reads
both of them (mirroring CaptureAction):
payment.getDetails()['payment_mollie_id'] for the standard Shop API and Apple Pay Direct
flows, stored in CreatePaymentAction.
order.getMolliePaymentId() for the QR-code flow, which stores the ID on the order itself
(QrCodeAction).
Reading only the payment details would reject legitimate QR-code payments, because their
payment details carry no payment_mollie_id, so both sources must be consulted.
Workarounds
If you cannot upgrade immediately, patch the vulnerability at the project level by
decorating the plugin's webhook controller. The decorator checks that the incoming Mollie
id matches the id stored for that order before handing over to the original controller,
so no plugin behaviour (state machine, logging) is lost and no extra Mollie API call is
made. Works on both 2.2 and 3.x.
Step 1. Create the decorator
Create src/Controller/Mollie/SecurePaymentWebhookController.php in your Sylius project:
<?php
declare(strict_types=1);
namespace App\Controller\Mollie;
use Sylius\Component\Core\Model\OrderInterface;
use Sylius\Component\Order\Repository\OrderRepositoryInterface;
use Sylius\MolliePlugin\Controller\Shop\PaymentWebhookController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
final class SecurePaymentWebhookController
{
public function __construct(
private readonly PaymentWebhookController $inner,
private readonly OrderRepositoryInterface $orderRepository,
) {
}
public function __invoke(Request $request): Response
{
$orderId = $request->get('orderId');
$molliePaymentId = $request->get('id');
if (null === $orderId || null === $molliePaymentId) {
return ($this->inner)($request);
}
/** @var OrderInterface|null $order */
$order = $this->orderRepository->findOneBy(['id' => $orderId]);
if (null === $order) {
return ($this->inner)($request);
}
$storedMollieId = $this->resolveStoredMollieId($order);
// Reject any webhook whose Mollie id does not match the one stored for this order.
// 200 is intentional: Mollie retries on any non-2xx response.
if (null === $storedMollieId || $storedMollieId !== (string) $molliePaymentId) {
return new JsonResponse(null, Response::HTTP_OK);
}
return ($this->inner)($request);
}
private function resolveStoredMollieId(OrderInterface $order): ?string
{
$payment = $order->getLastPayment();
$fromDetails = $payment?->getDetails()['payment_mollie_id'] ?? null;
if (null !== $fromDetails && '' !== $fromDetails) {
return (string) $fromDetails;
}
// QR-code flow stores the Mollie id on the order itself.
if (method_exists($order, 'getMolliePaymentId')) {
$fromOrder = $order->getMolliePaymentId();
if (null !== $fromOrder && '' !== $fromOrder) {
return (string) $fromOrder;
}
}
return null;
}
}
decorates: keeps the original service ID, so the route
_controller: sylius_mollie.controller.shop.payment_webhook keeps working with no route
changes. @.inner is the original plugin controller.
Sylius Mollie Plugin has unauthenticated IDOR that leaks order token and customer PII
6.5
/ 10
Medium
Network
Low
None
None
Unchanged
Low
None
Low
Impact
Two unauthenticated Mollie shop endpoints look up orders by a sequential integer orderId
with no ownership or session check. Chained, they expose customer PII.
GET /{_locale}/thank-you (PageRedirectController::thankYouAction, route
sylius_mollie_shop_thank_you_page_redirect) loads the order with findOneBy(['id' => $orderId])
and returns a 302 whose Location header carries that order's tokenValue. Any orderId
thus yields that order's token. A non-existent id dereferences null and returns a 500. The
handler also writes the raw orderId into the session.
GET /{_locale}/get-code (QrCodeAction::fetchQrCodeFromOrder, route
sylius_mollie_shop_get_qr_code) runs the same lookup and returns the order's QR code and id
as JSON, ignoring the session cart; this is where the front-end got the integer id. A bad id
500s here too.
That tokenValue is the order's only access control. Passed to the Sylius core page
GET /{_locale}/register-after-checkout/{tokenValue} it returns a form pre-filled with the
customer's first name, last name and email. The full attack: enumerate orderId, read the
token from the redirect, read the PII, at roughly a 1-in-71 hit rate for guest orders.
register-after-checkout is Sylius core, not the plugin, and trusts the token by design, so
the leak is what must be fixed.
None of the plugin endpoints require a login, session or CSRF token.
Patches
Fixed in 2.2.8, 3.2.4 and 3.3.1.
Workarounds
If you cannot upgrade immediately, patch both endpoints at the project level by decorating
the plugin controllers. The decorators enforce ownership before delegating to the original
controller, so no plugin behaviour is lost. They keep the original orderId request contract,
so no front-end or asset changes are required. Works on both 2.2 and 3.x.
Step 1. Decorate the QR code controller
Create src/Controller/Mollie/SecureQrCodeAction.php in your Sylius project:
<?php
declare(strict_types=1);
namespace App\Controller\Mollie;
use Sylius\Component\Order\Context\CartContextInterface;
use Sylius\Component\Order\Context\CartNotFoundException;
use Sylius\MolliePlugin\Controller\Shop\QrCodeAction;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
final class SecureQrCodeAction
{
private const OWNED_ORDER_IDS_SESSION_KEY = 'sylius_mollie.owned_order_ids';
public function __construct(
private readonly QrCodeAction $inner,
private readonly CartContextInterface $cartContext,
) {
}
public function fetchQrCodeFromOrder(Request $request): JsonResponse
{
$orderId = $request->get('orderId');
try {
$cart = $this->cartContext->getCart();
} catch (CartNotFoundException) {
$cart = null;
}
if (null !== $orderId && (null === $cart || (string) $cart->getId() !== (string) $orderId)) {
return new JsonResponse([], Response::HTTP_FORBIDDEN);
}
if (null !== $cart && null !== $cart->getId() && $request->hasSession()) {
$session = $request->getSession();
$ownedIds = $session->get(self::OWNED_ORDER_IDS_SESSION_KEY, []);
$ownedIds[(string) $cart->getId()] = true;
$session->set(self::OWNED_ORDER_IDS_SESSION_KEY, $ownedIds);
}
return $this->inner->fetchQrCodeFromOrder($request);
}
public function createPayment(Request $request): Response
{
return $this->inner->createPayment($request);
}
public function removeQrCodeFromOrder(Request $request): JsonResponse
{
return $this->inner->removeQrCodeFromOrder($request);
}
}
Both decorators keep @.inner and only add an ownership check on orderId before handing
the request to the original action, so createPayment, removeQrCodeFromOrder and the
thank-you redirect all keep their original behaviour and the front-end contract is unchanged.
Sylius Mollie Plugin vulnerable to payment status forgery via the payment webhook
7.5
/ 10
High
Network
Low
None
None
Unchanged
None
High
None
Impact
The shop payment webhook POST /{_locale}/update-payment (route
sylius_mollie_shop_payment_webhook) accepts two independent, attacker-controlled
parameters: id (the Mollie payment ID, verified against Mollie's API) and orderId (the
Sylius order ID, read directly from the database). The handler never verifies that the
Mollie payment belongs to the referenced order.
An unauthenticated attacker who holds any valid paid Mollie payment ID, for example
from a EUR 1 order they placed themselves, can submit it together with any victim
orderId. The victim's order payment is then transitioned to completed (or any other
Mollie-derived state) without any funds being transferred for that order. Sylius order IDs
are sequential integers, and the endpoint requires no authentication, CSRF token or rate
limiting, so the attack scales trivially across all pending orders.
Patches
Fixed in versions 2.2.8, 3.2.4 and 3.3.1. The webhook now binds the payment to
the order: it reads the Mollie payment ID stored server-side for that order when the payment
was created and compares it to the incoming Mollie payment ID. On mismatch the request is
acknowledged with HTTP 200 and no state change is applied. HTTP 200 is intentional,
because Mollie retries the webhook on any non-2xx response.
The stored ID lives in one of two places depending on the checkout flow, and the fix reads
both of them (mirroring CaptureAction):
payment.getDetails()['payment_mollie_id'] for the standard Shop API and Apple Pay Direct
flows, stored in CreatePaymentAction.
order.getMolliePaymentId() for the QR-code flow, which stores the ID on the order itself
(QrCodeAction).
Reading only the payment details would reject legitimate QR-code payments, because their
payment details carry no payment_mollie_id, so both sources must be consulted.
Workarounds
If you cannot upgrade immediately, patch the vulnerability at the project level by
decorating the plugin's webhook controller. The decorator checks that the incoming Mollie
id matches the id stored for that order before handing over to the original controller,
so no plugin behaviour (state machine, logging) is lost and no extra Mollie API call is
made. Works on both 2.2 and 3.x.
Step 1. Create the decorator
Create src/Controller/Mollie/SecurePaymentWebhookController.php in your Sylius project:
<?php
declare(strict_types=1);
namespace App\Controller\Mollie;
use Sylius\Component\Core\Model\OrderInterface;
use Sylius\Component\Order\Repository\OrderRepositoryInterface;
use Sylius\MolliePlugin\Controller\Shop\PaymentWebhookController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
final class SecurePaymentWebhookController
{
public function __construct(
private readonly PaymentWebhookController $inner,
private readonly OrderRepositoryInterface $orderRepository,
) {
}
public function __invoke(Request $request): Response
{
$orderId = $request->get('orderId');
$molliePaymentId = $request->get('id');
if (null === $orderId || null === $molliePaymentId) {
return ($this->inner)($request);
}
/** @var OrderInterface|null $order */
$order = $this->orderRepository->findOneBy(['id' => $orderId]);
if (null === $order) {
return ($this->inner)($request);
}
$storedMollieId = $this->resolveStoredMollieId($order);
// Reject any webhook whose Mollie id does not match the one stored for this order.
// 200 is intentional: Mollie retries on any non-2xx response.
if (null === $storedMollieId || $storedMollieId !== (string) $molliePaymentId) {
return new JsonResponse(null, Response::HTTP_OK);
}
return ($this->inner)($request);
}
private function resolveStoredMollieId(OrderInterface $order): ?string
{
$payment = $order->getLastPayment();
$fromDetails = $payment?->getDetails()['payment_mollie_id'] ?? null;
if (null !== $fromDetails && '' !== $fromDetails) {
return (string) $fromDetails;
}
// QR-code flow stores the Mollie id on the order itself.
if (method_exists($order, 'getMolliePaymentId')) {
$fromOrder = $order->getMolliePaymentId();
if (null !== $fromOrder && '' !== $fromOrder) {
return (string) $fromOrder;
}
}
return null;
}
}
decorates: keeps the original service ID, so the route
_controller: sylius_mollie.controller.shop.payment_webhook keeps working with no route
changes. @.inner is the original plugin controller.
Sylius Mollie Plugin has unauthenticated IDOR that leaks order token and customer PII
6.5
/ 10
Medium
Network
Low
None
None
Unchanged
Low
None
Low
Impact
Two unauthenticated Mollie shop endpoints look up orders by a sequential integer orderId
with no ownership or session check. Chained, they expose customer PII.
GET /{_locale}/thank-you (PageRedirectController::thankYouAction, route
sylius_mollie_shop_thank_you_page_redirect) loads the order with findOneBy(['id' => $orderId])
and returns a 302 whose Location header carries that order's tokenValue. Any orderId
thus yields that order's token. A non-existent id dereferences null and returns a 500. The
handler also writes the raw orderId into the session.
GET /{_locale}/get-code (QrCodeAction::fetchQrCodeFromOrder, route
sylius_mollie_shop_get_qr_code) runs the same lookup and returns the order's QR code and id
as JSON, ignoring the session cart; this is where the front-end got the integer id. A bad id
500s here too.
That tokenValue is the order's only access control. Passed to the Sylius core page
GET /{_locale}/register-after-checkout/{tokenValue} it returns a form pre-filled with the
customer's first name, last name and email. The full attack: enumerate orderId, read the
token from the redirect, read the PII, at roughly a 1-in-71 hit rate for guest orders.
register-after-checkout is Sylius core, not the plugin, and trusts the token by design, so
the leak is what must be fixed.
None of the plugin endpoints require a login, session or CSRF token.
Patches
Fixed in 2.2.8, 3.2.4 and 3.3.1.
Workarounds
If you cannot upgrade immediately, patch both endpoints at the project level by decorating
the plugin controllers. The decorators enforce ownership before delegating to the original
controller, so no plugin behaviour is lost. They keep the original orderId request contract,
so no front-end or asset changes are required. Works on both 2.2 and 3.x.
Step 1. Decorate the QR code controller
Create src/Controller/Mollie/SecureQrCodeAction.php in your Sylius project:
<?php
declare(strict_types=1);
namespace App\Controller\Mollie;
use Sylius\Component\Order\Context\CartContextInterface;
use Sylius\Component\Order\Context\CartNotFoundException;
use Sylius\MolliePlugin\Controller\Shop\QrCodeAction;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
final class SecureQrCodeAction
{
private const OWNED_ORDER_IDS_SESSION_KEY = 'sylius_mollie.owned_order_ids';
public function __construct(
private readonly QrCodeAction $inner,
private readonly CartContextInterface $cartContext,
) {
}
public function fetchQrCodeFromOrder(Request $request): JsonResponse
{
$orderId = $request->get('orderId');
try {
$cart = $this->cartContext->getCart();
} catch (CartNotFoundException) {
$cart = null;
}
if (null !== $orderId && (null === $cart || (string) $cart->getId() !== (string) $orderId)) {
return new JsonResponse([], Response::HTTP_FORBIDDEN);
}
if (null !== $cart && null !== $cart->getId() && $request->hasSession()) {
$session = $request->getSession();
$ownedIds = $session->get(self::OWNED_ORDER_IDS_SESSION_KEY, []);
$ownedIds[(string) $cart->getId()] = true;
$session->set(self::OWNED_ORDER_IDS_SESSION_KEY, $ownedIds);
}
return $this->inner->fetchQrCodeFromOrder($request);
}
public function createPayment(Request $request): Response
{
return $this->inner->createPayment($request);
}
public function removeQrCodeFromOrder(Request $request): JsonResponse
{
return $this->inner->removeQrCodeFromOrder($request);
}
}
Both decorators keep @.inner and only add an ownership check on orderId before handing
the request to the original action, so createPayment, removeQrCodeFromOrder and the
thank-you redirect all keep their original behaviour and the front-end contract is unchanged.
Sylius Mollie Plugin vulnerable to payment status forgery via the payment webhook
7.5
/ 10
High
Network
Low
None
None
Unchanged
None
High
None
Impact
The shop payment webhook POST /{_locale}/update-payment (route
sylius_mollie_shop_payment_webhook) accepts two independent, attacker-controlled
parameters: id (the Mollie payment ID, verified against Mollie's API) and orderId (the
Sylius order ID, read directly from the database). The handler never verifies that the
Mollie payment belongs to the referenced order.
An unauthenticated attacker who holds any valid paid Mollie payment ID, for example
from a EUR 1 order they placed themselves, can submit it together with any victim
orderId. The victim's order payment is then transitioned to completed (or any other
Mollie-derived state) without any funds being transferred for that order. Sylius order IDs
are sequential integers, and the endpoint requires no authentication, CSRF token or rate
limiting, so the attack scales trivially across all pending orders.
Patches
Fixed in versions 2.2.8, 3.2.4 and 3.3.1. The webhook now binds the payment to
the order: it reads the Mollie payment ID stored server-side for that order when the payment
was created and compares it to the incoming Mollie payment ID. On mismatch the request is
acknowledged with HTTP 200 and no state change is applied. HTTP 200 is intentional,
because Mollie retries the webhook on any non-2xx response.
The stored ID lives in one of two places depending on the checkout flow, and the fix reads
both of them (mirroring CaptureAction):
payment.getDetails()['payment_mollie_id'] for the standard Shop API and Apple Pay Direct
flows, stored in CreatePaymentAction.
order.getMolliePaymentId() for the QR-code flow, which stores the ID on the order itself
(QrCodeAction).
Reading only the payment details would reject legitimate QR-code payments, because their
payment details carry no payment_mollie_id, so both sources must be consulted.
Workarounds
If you cannot upgrade immediately, patch the vulnerability at the project level by
decorating the plugin's webhook controller. The decorator checks that the incoming Mollie
id matches the id stored for that order before handing over to the original controller,
so no plugin behaviour (state machine, logging) is lost and no extra Mollie API call is
made. Works on both 2.2 and 3.x.
Step 1. Create the decorator
Create src/Controller/Mollie/SecurePaymentWebhookController.php in your Sylius project:
<?php
declare(strict_types=1);
namespace App\Controller\Mollie;
use Sylius\Component\Core\Model\OrderInterface;
use Sylius\Component\Order\Repository\OrderRepositoryInterface;
use Sylius\MolliePlugin\Controller\Shop\PaymentWebhookController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
final class SecurePaymentWebhookController
{
public function __construct(
private readonly PaymentWebhookController $inner,
private readonly OrderRepositoryInterface $orderRepository,
) {
}
public function __invoke(Request $request): Response
{
$orderId = $request->get('orderId');
$molliePaymentId = $request->get('id');
if (null === $orderId || null === $molliePaymentId) {
return ($this->inner)($request);
}
/** @var OrderInterface|null $order */
$order = $this->orderRepository->findOneBy(['id' => $orderId]);
if (null === $order) {
return ($this->inner)($request);
}
$storedMollieId = $this->resolveStoredMollieId($order);
// Reject any webhook whose Mollie id does not match the one stored for this order.
// 200 is intentional: Mollie retries on any non-2xx response.
if (null === $storedMollieId || $storedMollieId !== (string) $molliePaymentId) {
return new JsonResponse(null, Response::HTTP_OK);
}
return ($this->inner)($request);
}
private function resolveStoredMollieId(OrderInterface $order): ?string
{
$payment = $order->getLastPayment();
$fromDetails = $payment?->getDetails()['payment_mollie_id'] ?? null;
if (null !== $fromDetails && '' !== $fromDetails) {
return (string) $fromDetails;
}
// QR-code flow stores the Mollie id on the order itself.
if (method_exists($order, 'getMolliePaymentId')) {
$fromOrder = $order->getMolliePaymentId();
if (null !== $fromOrder && '' !== $fromOrder) {
return (string) $fromOrder;
}
}
return null;
}
}
decorates: keeps the original service ID, so the route
_controller: sylius_mollie.controller.shop.payment_webhook keeps working with no route
changes. @.inner is the original plugin controller.
Sylius Mollie Plugin has unauthenticated IDOR that leaks order token and customer PII
6.5
/ 10
Medium
Network
Low
None
None
Unchanged
Low
None
Low
Impact
Two unauthenticated Mollie shop endpoints look up orders by a sequential integer orderId
with no ownership or session check. Chained, they expose customer PII.
GET /{_locale}/thank-you (PageRedirectController::thankYouAction, route
sylius_mollie_shop_thank_you_page_redirect) loads the order with findOneBy(['id' => $orderId])
and returns a 302 whose Location header carries that order's tokenValue. Any orderId
thus yields that order's token. A non-existent id dereferences null and returns a 500. The
handler also writes the raw orderId into the session.
GET /{_locale}/get-code (QrCodeAction::fetchQrCodeFromOrder, route
sylius_mollie_shop_get_qr_code) runs the same lookup and returns the order's QR code and id
as JSON, ignoring the session cart; this is where the front-end got the integer id. A bad id
500s here too.
That tokenValue is the order's only access control. Passed to the Sylius core page
GET /{_locale}/register-after-checkout/{tokenValue} it returns a form pre-filled with the
customer's first name, last name and email. The full attack: enumerate orderId, read the
token from the redirect, read the PII, at roughly a 1-in-71 hit rate for guest orders.
register-after-checkout is Sylius core, not the plugin, and trusts the token by design, so
the leak is what must be fixed.
None of the plugin endpoints require a login, session or CSRF token.
Patches
Fixed in 2.2.8, 3.2.4 and 3.3.1.
Workarounds
If you cannot upgrade immediately, patch both endpoints at the project level by decorating
the plugin controllers. The decorators enforce ownership before delegating to the original
controller, so no plugin behaviour is lost. They keep the original orderId request contract,
so no front-end or asset changes are required. Works on both 2.2 and 3.x.
Step 1. Decorate the QR code controller
Create src/Controller/Mollie/SecureQrCodeAction.php in your Sylius project:
<?php
declare(strict_types=1);
namespace App\Controller\Mollie;
use Sylius\Component\Order\Context\CartContextInterface;
use Sylius\Component\Order\Context\CartNotFoundException;
use Sylius\MolliePlugin\Controller\Shop\QrCodeAction;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
final class SecureQrCodeAction
{
private const OWNED_ORDER_IDS_SESSION_KEY = 'sylius_mollie.owned_order_ids';
public function __construct(
private readonly QrCodeAction $inner,
private readonly CartContextInterface $cartContext,
) {
}
public function fetchQrCodeFromOrder(Request $request): JsonResponse
{
$orderId = $request->get('orderId');
try {
$cart = $this->cartContext->getCart();
} catch (CartNotFoundException) {
$cart = null;
}
if (null !== $orderId && (null === $cart || (string) $cart->getId() !== (string) $orderId)) {
return new JsonResponse([], Response::HTTP_FORBIDDEN);
}
if (null !== $cart && null !== $cart->getId() && $request->hasSession()) {
$session = $request->getSession();
$ownedIds = $session->get(self::OWNED_ORDER_IDS_SESSION_KEY, []);
$ownedIds[(string) $cart->getId()] = true;
$session->set(self::OWNED_ORDER_IDS_SESSION_KEY, $ownedIds);
}
return $this->inner->fetchQrCodeFromOrder($request);
}
public function createPayment(Request $request): Response
{
return $this->inner->createPayment($request);
}
public function removeQrCodeFromOrder(Request $request): JsonResponse
{
return $this->inner->removeQrCodeFromOrder($request);
}
}
Both decorators keep @.inner and only add an ownership check on orderId before handing
the request to the original action, so createPayment, removeQrCodeFromOrder and the
thank-you redirect all keep their original behaviour and the front-end contract is unchanged.
Sylius Mollie Plugin vulnerable to payment status forgery via the payment webhook
7.5
/ 10
High
Network
Low
None
None
Unchanged
None
High
None
Impact
The shop payment webhook POST /{_locale}/update-payment (route
sylius_mollie_shop_payment_webhook) accepts two independent, attacker-controlled
parameters: id (the Mollie payment ID, verified against Mollie's API) and orderId (the
Sylius order ID, read directly from the database). The handler never verifies that the
Mollie payment belongs to the referenced order.
An unauthenticated attacker who holds any valid paid Mollie payment ID, for example
from a EUR 1 order they placed themselves, can submit it together with any victim
orderId. The victim's order payment is then transitioned to completed (or any other
Mollie-derived state) without any funds being transferred for that order. Sylius order IDs
are sequential integers, and the endpoint requires no authentication, CSRF token or rate
limiting, so the attack scales trivially across all pending orders.
Patches
Fixed in versions 2.2.8, 3.2.4 and 3.3.1. The webhook now binds the payment to
the order: it reads the Mollie payment ID stored server-side for that order when the payment
was created and compares it to the incoming Mollie payment ID. On mismatch the request is
acknowledged with HTTP 200 and no state change is applied. HTTP 200 is intentional,
because Mollie retries the webhook on any non-2xx response.
The stored ID lives in one of two places depending on the checkout flow, and the fix reads
both of them (mirroring CaptureAction):
payment.getDetails()['payment_mollie_id'] for the standard Shop API and Apple Pay Direct
flows, stored in CreatePaymentAction.
order.getMolliePaymentId() for the QR-code flow, which stores the ID on the order itself
(QrCodeAction).
Reading only the payment details would reject legitimate QR-code payments, because their
payment details carry no payment_mollie_id, so both sources must be consulted.
Workarounds
If you cannot upgrade immediately, patch the vulnerability at the project level by
decorating the plugin's webhook controller. The decorator checks that the incoming Mollie
id matches the id stored for that order before handing over to the original controller,
so no plugin behaviour (state machine, logging) is lost and no extra Mollie API call is
made. Works on both 2.2 and 3.x.
Step 1. Create the decorator
Create src/Controller/Mollie/SecurePaymentWebhookController.php in your Sylius project:
<?php
declare(strict_types=1);
namespace App\Controller\Mollie;
use Sylius\Component\Core\Model\OrderInterface;
use Sylius\Component\Order\Repository\OrderRepositoryInterface;
use Sylius\MolliePlugin\Controller\Shop\PaymentWebhookController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
final class SecurePaymentWebhookController
{
public function __construct(
private readonly PaymentWebhookController $inner,
private readonly OrderRepositoryInterface $orderRepository,
) {
}
public function __invoke(Request $request): Response
{
$orderId = $request->get('orderId');
$molliePaymentId = $request->get('id');
if (null === $orderId || null === $molliePaymentId) {
return ($this->inner)($request);
}
/** @var OrderInterface|null $order */
$order = $this->orderRepository->findOneBy(['id' => $orderId]);
if (null === $order) {
return ($this->inner)($request);
}
$storedMollieId = $this->resolveStoredMollieId($order);
// Reject any webhook whose Mollie id does not match the one stored for this order.
// 200 is intentional: Mollie retries on any non-2xx response.
if (null === $storedMollieId || $storedMollieId !== (string) $molliePaymentId) {
return new JsonResponse(null, Response::HTTP_OK);
}
return ($this->inner)($request);
}
private function resolveStoredMollieId(OrderInterface $order): ?string
{
$payment = $order->getLastPayment();
$fromDetails = $payment?->getDetails()['payment_mollie_id'] ?? null;
if (null !== $fromDetails && '' !== $fromDetails) {
return (string) $fromDetails;
}
// QR-code flow stores the Mollie id on the order itself.
if (method_exists($order, 'getMolliePaymentId')) {
$fromOrder = $order->getMolliePaymentId();
if (null !== $fromOrder && '' !== $fromOrder) {
return (string) $fromOrder;
}
}
return null;
}
}
decorates: keeps the original service ID, so the route
_controller: sylius_mollie.controller.shop.payment_webhook keeps working with no route
changes. @.inner is the original plugin controller.
Sylius Mollie Plugin has unauthenticated IDOR that leaks order token and customer PII
6.5
/ 10
Medium
Network
Low
None
None
Unchanged
Low
None
Low
Impact
Two unauthenticated Mollie shop endpoints look up orders by a sequential integer orderId
with no ownership or session check. Chained, they expose customer PII.
GET /{_locale}/thank-you (PageRedirectController::thankYouAction, route
sylius_mollie_shop_thank_you_page_redirect) loads the order with findOneBy(['id' => $orderId])
and returns a 302 whose Location header carries that order's tokenValue. Any orderId
thus yields that order's token. A non-existent id dereferences null and returns a 500. The
handler also writes the raw orderId into the session.
GET /{_locale}/get-code (QrCodeAction::fetchQrCodeFromOrder, route
sylius_mollie_shop_get_qr_code) runs the same lookup and returns the order's QR code and id
as JSON, ignoring the session cart; this is where the front-end got the integer id. A bad id
500s here too.
That tokenValue is the order's only access control. Passed to the Sylius core page
GET /{_locale}/register-after-checkout/{tokenValue} it returns a form pre-filled with the
customer's first name, last name and email. The full attack: enumerate orderId, read the
token from the redirect, read the PII, at roughly a 1-in-71 hit rate for guest orders.
register-after-checkout is Sylius core, not the plugin, and trusts the token by design, so
the leak is what must be fixed.
None of the plugin endpoints require a login, session or CSRF token.
Patches
Fixed in 2.2.8, 3.2.4 and 3.3.1.
Workarounds
If you cannot upgrade immediately, patch both endpoints at the project level by decorating
the plugin controllers. The decorators enforce ownership before delegating to the original
controller, so no plugin behaviour is lost. They keep the original orderId request contract,
so no front-end or asset changes are required. Works on both 2.2 and 3.x.
Step 1. Decorate the QR code controller
Create src/Controller/Mollie/SecureQrCodeAction.php in your Sylius project:
<?php
declare(strict_types=1);
namespace App\Controller\Mollie;
use Sylius\Component\Order\Context\CartContextInterface;
use Sylius\Component\Order\Context\CartNotFoundException;
use Sylius\MolliePlugin\Controller\Shop\QrCodeAction;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
final class SecureQrCodeAction
{
private const OWNED_ORDER_IDS_SESSION_KEY = 'sylius_mollie.owned_order_ids';
public function __construct(
private readonly QrCodeAction $inner,
private readonly CartContextInterface $cartContext,
) {
}
public function fetchQrCodeFromOrder(Request $request): JsonResponse
{
$orderId = $request->get('orderId');
try {
$cart = $this->cartContext->getCart();
} catch (CartNotFoundException) {
$cart = null;
}
if (null !== $orderId && (null === $cart || (string) $cart->getId() !== (string) $orderId)) {
return new JsonResponse([], Response::HTTP_FORBIDDEN);
}
if (null !== $cart && null !== $cart->getId() && $request->hasSession()) {
$session = $request->getSession();
$ownedIds = $session->get(self::OWNED_ORDER_IDS_SESSION_KEY, []);
$ownedIds[(string) $cart->getId()] = true;
$session->set(self::OWNED_ORDER_IDS_SESSION_KEY, $ownedIds);
}
return $this->inner->fetchQrCodeFromOrder($request);
}
public function createPayment(Request $request): Response
{
return $this->inner->createPayment($request);
}
public function removeQrCodeFromOrder(Request $request): JsonResponse
{
return $this->inner->removeQrCodeFromOrder($request);
}
}
Both decorators keep @.inner and only add an ownership check on orderId before handing
the request to the original action, so createPayment, removeQrCodeFromOrder and the
thank-you redirect all keep their original behaviour and the front-end contract is unchanged.
Sylius Mollie Plugin vulnerable to payment status forgery via the payment webhook
7.5
/ 10
High
Network
Low
None
None
Unchanged
None
High
None
Impact
The shop payment webhook POST /{_locale}/update-payment (route
sylius_mollie_shop_payment_webhook) accepts two independent, attacker-controlled
parameters: id (the Mollie payment ID, verified against Mollie's API) and orderId (the
Sylius order ID, read directly from the database). The handler never verifies that the
Mollie payment belongs to the referenced order.
An unauthenticated attacker who holds any valid paid Mollie payment ID, for example
from a EUR 1 order they placed themselves, can submit it together with any victim
orderId. The victim's order payment is then transitioned to completed (or any other
Mollie-derived state) without any funds being transferred for that order. Sylius order IDs
are sequential integers, and the endpoint requires no authentication, CSRF token or rate
limiting, so the attack scales trivially across all pending orders.
Patches
Fixed in versions 2.2.8, 3.2.4 and 3.3.1. The webhook now binds the payment to
the order: it reads the Mollie payment ID stored server-side for that order when the payment
was created and compares it to the incoming Mollie payment ID. On mismatch the request is
acknowledged with HTTP 200 and no state change is applied. HTTP 200 is intentional,
because Mollie retries the webhook on any non-2xx response.
The stored ID lives in one of two places depending on the checkout flow, and the fix reads
both of them (mirroring CaptureAction):
payment.getDetails()['payment_mollie_id'] for the standard Shop API and Apple Pay Direct
flows, stored in CreatePaymentAction.
order.getMolliePaymentId() for the QR-code flow, which stores the ID on the order itself
(QrCodeAction).
Reading only the payment details would reject legitimate QR-code payments, because their
payment details carry no payment_mollie_id, so both sources must be consulted.
Workarounds
If you cannot upgrade immediately, patch the vulnerability at the project level by
decorating the plugin's webhook controller. The decorator checks that the incoming Mollie
id matches the id stored for that order before handing over to the original controller,
so no plugin behaviour (state machine, logging) is lost and no extra Mollie API call is
made. Works on both 2.2 and 3.x.
Step 1. Create the decorator
Create src/Controller/Mollie/SecurePaymentWebhookController.php in your Sylius project:
<?php
declare(strict_types=1);
namespace App\Controller\Mollie;
use Sylius\Component\Core\Model\OrderInterface;
use Sylius\Component\Order\Repository\OrderRepositoryInterface;
use Sylius\MolliePlugin\Controller\Shop\PaymentWebhookController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
final class SecurePaymentWebhookController
{
public function __construct(
private readonly PaymentWebhookController $inner,
private readonly OrderRepositoryInterface $orderRepository,
) {
}
public function __invoke(Request $request): Response
{
$orderId = $request->get('orderId');
$molliePaymentId = $request->get('id');
if (null === $orderId || null === $molliePaymentId) {
return ($this->inner)($request);
}
/** @var OrderInterface|null $order */
$order = $this->orderRepository->findOneBy(['id' => $orderId]);
if (null === $order) {
return ($this->inner)($request);
}
$storedMollieId = $this->resolveStoredMollieId($order);
// Reject any webhook whose Mollie id does not match the one stored for this order.
// 200 is intentional: Mollie retries on any non-2xx response.
if (null === $storedMollieId || $storedMollieId !== (string) $molliePaymentId) {
return new JsonResponse(null, Response::HTTP_OK);
}
return ($this->inner)($request);
}
private function resolveStoredMollieId(OrderInterface $order): ?string
{
$payment = $order->getLastPayment();
$fromDetails = $payment?->getDetails()['payment_mollie_id'] ?? null;
if (null !== $fromDetails && '' !== $fromDetails) {
return (string) $fromDetails;
}
// QR-code flow stores the Mollie id on the order itself.
if (method_exists($order, 'getMolliePaymentId')) {
$fromOrder = $order->getMolliePaymentId();
if (null !== $fromOrder && '' !== $fromOrder) {
return (string) $fromOrder;
}
}
return null;
}
}
decorates: keeps the original service ID, so the route
_controller: sylius_mollie.controller.shop.payment_webhook keeps working with no route
changes. @.inner is the original plugin controller.
Sylius Mollie Plugin has unauthenticated IDOR that leaks order token and customer PII
6.5
/ 10
Medium
Network
Low
None
None
Unchanged
Low
None
Low
Impact
Two unauthenticated Mollie shop endpoints look up orders by a sequential integer orderId
with no ownership or session check. Chained, they expose customer PII.
GET /{_locale}/thank-you (PageRedirectController::thankYouAction, route
sylius_mollie_shop_thank_you_page_redirect) loads the order with findOneBy(['id' => $orderId])
and returns a 302 whose Location header carries that order's tokenValue. Any orderId
thus yields that order's token. A non-existent id dereferences null and returns a 500. The
handler also writes the raw orderId into the session.
GET /{_locale}/get-code (QrCodeAction::fetchQrCodeFromOrder, route
sylius_mollie_shop_get_qr_code) runs the same lookup and returns the order's QR code and id
as JSON, ignoring the session cart; this is where the front-end got the integer id. A bad id
500s here too.
That tokenValue is the order's only access control. Passed to the Sylius core page
GET /{_locale}/register-after-checkout/{tokenValue} it returns a form pre-filled with the
customer's first name, last name and email. The full attack: enumerate orderId, read the
token from the redirect, read the PII, at roughly a 1-in-71 hit rate for guest orders.
register-after-checkout is Sylius core, not the plugin, and trusts the token by design, so
the leak is what must be fixed.
None of the plugin endpoints require a login, session or CSRF token.
Patches
Fixed in 2.2.8, 3.2.4 and 3.3.1.
Workarounds
If you cannot upgrade immediately, patch both endpoints at the project level by decorating
the plugin controllers. The decorators enforce ownership before delegating to the original
controller, so no plugin behaviour is lost. They keep the original orderId request contract,
so no front-end or asset changes are required. Works on both 2.2 and 3.x.
Step 1. Decorate the QR code controller
Create src/Controller/Mollie/SecureQrCodeAction.php in your Sylius project:
<?php
declare(strict_types=1);
namespace App\Controller\Mollie;
use Sylius\Component\Order\Context\CartContextInterface;
use Sylius\Component\Order\Context\CartNotFoundException;
use Sylius\MolliePlugin\Controller\Shop\QrCodeAction;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
final class SecureQrCodeAction
{
private const OWNED_ORDER_IDS_SESSION_KEY = 'sylius_mollie.owned_order_ids';
public function __construct(
private readonly QrCodeAction $inner,
private readonly CartContextInterface $cartContext,
) {
}
public function fetchQrCodeFromOrder(Request $request): JsonResponse
{
$orderId = $request->get('orderId');
try {
$cart = $this->cartContext->getCart();
} catch (CartNotFoundException) {
$cart = null;
}
if (null !== $orderId && (null === $cart || (string) $cart->getId() !== (string) $orderId)) {
return new JsonResponse([], Response::HTTP_FORBIDDEN);
}
if (null !== $cart && null !== $cart->getId() && $request->hasSession()) {
$session = $request->getSession();
$ownedIds = $session->get(self::OWNED_ORDER_IDS_SESSION_KEY, []);
$ownedIds[(string) $cart->getId()] = true;
$session->set(self::OWNED_ORDER_IDS_SESSION_KEY, $ownedIds);
}
return $this->inner->fetchQrCodeFromOrder($request);
}
public function createPayment(Request $request): Response
{
return $this->inner->createPayment($request);
}
public function removeQrCodeFromOrder(Request $request): JsonResponse
{
return $this->inner->removeQrCodeFromOrder($request);
}
}
Both decorators keep @.inner and only add an ownership check on orderId before handing
the request to the original action, so createPayment, removeQrCodeFromOrder and the
thank-you redirect all keep their original behaviour and the front-end contract is unchanged.
Sylius Mollie Plugin vulnerable to payment status forgery via the payment webhook
7.5
/ 10
High
Network
Low
None
None
Unchanged
None
High
None
Impact
The shop payment webhook POST /{_locale}/update-payment (route
sylius_mollie_shop_payment_webhook) accepts two independent, attacker-controlled
parameters: id (the Mollie payment ID, verified against Mollie's API) and orderId (the
Sylius order ID, read directly from the database). The handler never verifies that the
Mollie payment belongs to the referenced order.
An unauthenticated attacker who holds any valid paid Mollie payment ID, for example
from a EUR 1 order they placed themselves, can submit it together with any victim
orderId. The victim's order payment is then transitioned to completed (or any other
Mollie-derived state) without any funds being transferred for that order. Sylius order IDs
are sequential integers, and the endpoint requires no authentication, CSRF token or rate
limiting, so the attack scales trivially across all pending orders.
Patches
Fixed in versions 2.2.8, 3.2.4 and 3.3.1. The webhook now binds the payment to
the order: it reads the Mollie payment ID stored server-side for that order when the payment
was created and compares it to the incoming Mollie payment ID. On mismatch the request is
acknowledged with HTTP 200 and no state change is applied. HTTP 200 is intentional,
because Mollie retries the webhook on any non-2xx response.
The stored ID lives in one of two places depending on the checkout flow, and the fix reads
both of them (mirroring CaptureAction):
payment.getDetails()['payment_mollie_id'] for the standard Shop API and Apple Pay Direct
flows, stored in CreatePaymentAction.
order.getMolliePaymentId() for the QR-code flow, which stores the ID on the order itself
(QrCodeAction).
Reading only the payment details would reject legitimate QR-code payments, because their
payment details carry no payment_mollie_id, so both sources must be consulted.
Workarounds
If you cannot upgrade immediately, patch the vulnerability at the project level by
decorating the plugin's webhook controller. The decorator checks that the incoming Mollie
id matches the id stored for that order before handing over to the original controller,
so no plugin behaviour (state machine, logging) is lost and no extra Mollie API call is
made. Works on both 2.2 and 3.x.
Step 1. Create the decorator
Create src/Controller/Mollie/SecurePaymentWebhookController.php in your Sylius project:
<?php
declare(strict_types=1);
namespace App\Controller\Mollie;
use Sylius\Component\Core\Model\OrderInterface;
use Sylius\Component\Order\Repository\OrderRepositoryInterface;
use Sylius\MolliePlugin\Controller\Shop\PaymentWebhookController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
final class SecurePaymentWebhookController
{
public function __construct(
private readonly PaymentWebhookController $inner,
private readonly OrderRepositoryInterface $orderRepository,
) {
}
public function __invoke(Request $request): Response
{
$orderId = $request->get('orderId');
$molliePaymentId = $request->get('id');
if (null === $orderId || null === $molliePaymentId) {
return ($this->inner)($request);
}
/** @var OrderInterface|null $order */
$order = $this->orderRepository->findOneBy(['id' => $orderId]);
if (null === $order) {
return ($this->inner)($request);
}
$storedMollieId = $this->resolveStoredMollieId($order);
// Reject any webhook whose Mollie id does not match the one stored for this order.
// 200 is intentional: Mollie retries on any non-2xx response.
if (null === $storedMollieId || $storedMollieId !== (string) $molliePaymentId) {
return new JsonResponse(null, Response::HTTP_OK);
}
return ($this->inner)($request);
}
private function resolveStoredMollieId(OrderInterface $order): ?string
{
$payment = $order->getLastPayment();
$fromDetails = $payment?->getDetails()['payment_mollie_id'] ?? null;
if (null !== $fromDetails && '' !== $fromDetails) {
return (string) $fromDetails;
}
// QR-code flow stores the Mollie id on the order itself.
if (method_exists($order, 'getMolliePaymentId')) {
$fromOrder = $order->getMolliePaymentId();
if (null !== $fromOrder && '' !== $fromOrder) {
return (string) $fromOrder;
}
}
return null;
}
}
decorates: keeps the original service ID, so the route
_controller: sylius_mollie.controller.shop.payment_webhook keeps working with no route
changes. @.inner is the original plugin controller.
Sylius Mollie Plugin has unauthenticated IDOR that leaks order token and customer PII
6.5
/ 10
Medium
Network
Low
None
None
Unchanged
Low
None
Low
Impact
Two unauthenticated Mollie shop endpoints look up orders by a sequential integer orderId
with no ownership or session check. Chained, they expose customer PII.
GET /{_locale}/thank-you (PageRedirectController::thankYouAction, route
sylius_mollie_shop_thank_you_page_redirect) loads the order with findOneBy(['id' => $orderId])
and returns a 302 whose Location header carries that order's tokenValue. Any orderId
thus yields that order's token. A non-existent id dereferences null and returns a 500. The
handler also writes the raw orderId into the session.
GET /{_locale}/get-code (QrCodeAction::fetchQrCodeFromOrder, route
sylius_mollie_shop_get_qr_code) runs the same lookup and returns the order's QR code and id
as JSON, ignoring the session cart; this is where the front-end got the integer id. A bad id
500s here too.
That tokenValue is the order's only access control. Passed to the Sylius core page
GET /{_locale}/register-after-checkout/{tokenValue} it returns a form pre-filled with the
customer's first name, last name and email. The full attack: enumerate orderId, read the
token from the redirect, read the PII, at roughly a 1-in-71 hit rate for guest orders.
register-after-checkout is Sylius core, not the plugin, and trusts the token by design, so
the leak is what must be fixed.
None of the plugin endpoints require a login, session or CSRF token.
Patches
Fixed in 2.2.8, 3.2.4 and 3.3.1.
Workarounds
If you cannot upgrade immediately, patch both endpoints at the project level by decorating
the plugin controllers. The decorators enforce ownership before delegating to the original
controller, so no plugin behaviour is lost. They keep the original orderId request contract,
so no front-end or asset changes are required. Works on both 2.2 and 3.x.
Step 1. Decorate the QR code controller
Create src/Controller/Mollie/SecureQrCodeAction.php in your Sylius project:
<?php
declare(strict_types=1);
namespace App\Controller\Mollie;
use Sylius\Component\Order\Context\CartContextInterface;
use Sylius\Component\Order\Context\CartNotFoundException;
use Sylius\MolliePlugin\Controller\Shop\QrCodeAction;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
final class SecureQrCodeAction
{
private const OWNED_ORDER_IDS_SESSION_KEY = 'sylius_mollie.owned_order_ids';
public function __construct(
private readonly QrCodeAction $inner,
private readonly CartContextInterface $cartContext,
) {
}
public function fetchQrCodeFromOrder(Request $request): JsonResponse
{
$orderId = $request->get('orderId');
try {
$cart = $this->cartContext->getCart();
} catch (CartNotFoundException) {
$cart = null;
}
if (null !== $orderId && (null === $cart || (string) $cart->getId() !== (string) $orderId)) {
return new JsonResponse([], Response::HTTP_FORBIDDEN);
}
if (null !== $cart && null !== $cart->getId() && $request->hasSession()) {
$session = $request->getSession();
$ownedIds = $session->get(self::OWNED_ORDER_IDS_SESSION_KEY, []);
$ownedIds[(string) $cart->getId()] = true;
$session->set(self::OWNED_ORDER_IDS_SESSION_KEY, $ownedIds);
}
return $this->inner->fetchQrCodeFromOrder($request);
}
public function createPayment(Request $request): Response
{
return $this->inner->createPayment($request);
}
public function removeQrCodeFromOrder(Request $request): JsonResponse
{
return $this->inner->removeQrCodeFromOrder($request);
}
}
Both decorators keep @.inner and only add an ownership check on orderId before handing
the request to the original action, so createPayment, removeQrCodeFromOrder and the
thank-you redirect all keep their original behaviour and the front-end contract is unchanged.
Sylius Mollie Plugin vulnerable to payment status forgery via the payment webhook
7.5
/ 10
High
Network
Low
None
None
Unchanged
None
High
None
Impact
The shop payment webhook POST /{_locale}/update-payment (route
sylius_mollie_shop_payment_webhook) accepts two independent, attacker-controlled
parameters: id (the Mollie payment ID, verified against Mollie's API) and orderId (the
Sylius order ID, read directly from the database). The handler never verifies that the
Mollie payment belongs to the referenced order.
An unauthenticated attacker who holds any valid paid Mollie payment ID, for example
from a EUR 1 order they placed themselves, can submit it together with any victim
orderId. The victim's order payment is then transitioned to completed (or any other
Mollie-derived state) without any funds being transferred for that order. Sylius order IDs
are sequential integers, and the endpoint requires no authentication, CSRF token or rate
limiting, so the attack scales trivially across all pending orders.
Patches
Fixed in versions 2.2.8, 3.2.4 and 3.3.1. The webhook now binds the payment to
the order: it reads the Mollie payment ID stored server-side for that order when the payment
was created and compares it to the incoming Mollie payment ID. On mismatch the request is
acknowledged with HTTP 200 and no state change is applied. HTTP 200 is intentional,
because Mollie retries the webhook on any non-2xx response.
The stored ID lives in one of two places depending on the checkout flow, and the fix reads
both of them (mirroring CaptureAction):
payment.getDetails()['payment_mollie_id'] for the standard Shop API and Apple Pay Direct
flows, stored in CreatePaymentAction.
order.getMolliePaymentId() for the QR-code flow, which stores the ID on the order itself
(QrCodeAction).
Reading only the payment details would reject legitimate QR-code payments, because their
payment details carry no payment_mollie_id, so both sources must be consulted.
Workarounds
If you cannot upgrade immediately, patch the vulnerability at the project level by
decorating the plugin's webhook controller. The decorator checks that the incoming Mollie
id matches the id stored for that order before handing over to the original controller,
so no plugin behaviour (state machine, logging) is lost and no extra Mollie API call is
made. Works on both 2.2 and 3.x.
Step 1. Create the decorator
Create src/Controller/Mollie/SecurePaymentWebhookController.php in your Sylius project:
<?php
declare(strict_types=1);
namespace App\Controller\Mollie;
use Sylius\Component\Core\Model\OrderInterface;
use Sylius\Component\Order\Repository\OrderRepositoryInterface;
use Sylius\MolliePlugin\Controller\Shop\PaymentWebhookController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
final class SecurePaymentWebhookController
{
public function __construct(
private readonly PaymentWebhookController $inner,
private readonly OrderRepositoryInterface $orderRepository,
) {
}
public function __invoke(Request $request): Response
{
$orderId = $request->get('orderId');
$molliePaymentId = $request->get('id');
if (null === $orderId || null === $molliePaymentId) {
return ($this->inner)($request);
}
/** @var OrderInterface|null $order */
$order = $this->orderRepository->findOneBy(['id' => $orderId]);
if (null === $order) {
return ($this->inner)($request);
}
$storedMollieId = $this->resolveStoredMollieId($order);
// Reject any webhook whose Mollie id does not match the one stored for this order.
// 200 is intentional: Mollie retries on any non-2xx response.
if (null === $storedMollieId || $storedMollieId !== (string) $molliePaymentId) {
return new JsonResponse(null, Response::HTTP_OK);
}
return ($this->inner)($request);
}
private function resolveStoredMollieId(OrderInterface $order): ?string
{
$payment = $order->getLastPayment();
$fromDetails = $payment?->getDetails()['payment_mollie_id'] ?? null;
if (null !== $fromDetails && '' !== $fromDetails) {
return (string) $fromDetails;
}
// QR-code flow stores the Mollie id on the order itself.
if (method_exists($order, 'getMolliePaymentId')) {
$fromOrder = $order->getMolliePaymentId();
if (null !== $fromOrder && '' !== $fromOrder) {
return (string) $fromOrder;
}
}
return null;
}
}
decorates: keeps the original service ID, so the route
_controller: sylius_mollie.controller.shop.payment_webhook keeps working with no route
changes. @.inner is the original plugin controller.
Sylius Mollie Plugin has unauthenticated IDOR that leaks order token and customer PII
6.5
/ 10
Medium
Network
Low
None
None
Unchanged
Low
None
Low
Impact
Two unauthenticated Mollie shop endpoints look up orders by a sequential integer orderId
with no ownership or session check. Chained, they expose customer PII.
GET /{_locale}/thank-you (PageRedirectController::thankYouAction, route
sylius_mollie_shop_thank_you_page_redirect) loads the order with findOneBy(['id' => $orderId])
and returns a 302 whose Location header carries that order's tokenValue. Any orderId
thus yields that order's token. A non-existent id dereferences null and returns a 500. The
handler also writes the raw orderId into the session.
GET /{_locale}/get-code (QrCodeAction::fetchQrCodeFromOrder, route
sylius_mollie_shop_get_qr_code) runs the same lookup and returns the order's QR code and id
as JSON, ignoring the session cart; this is where the front-end got the integer id. A bad id
500s here too.
That tokenValue is the order's only access control. Passed to the Sylius core page
GET /{_locale}/register-after-checkout/{tokenValue} it returns a form pre-filled with the
customer's first name, last name and email. The full attack: enumerate orderId, read the
token from the redirect, read the PII, at roughly a 1-in-71 hit rate for guest orders.
register-after-checkout is Sylius core, not the plugin, and trusts the token by design, so
the leak is what must be fixed.
None of the plugin endpoints require a login, session or CSRF token.
Patches
Fixed in 2.2.8, 3.2.4 and 3.3.1.
Workarounds
If you cannot upgrade immediately, patch both endpoints at the project level by decorating
the plugin controllers. The decorators enforce ownership before delegating to the original
controller, so no plugin behaviour is lost. They keep the original orderId request contract,
so no front-end or asset changes are required. Works on both 2.2 and 3.x.
Step 1. Decorate the QR code controller
Create src/Controller/Mollie/SecureQrCodeAction.php in your Sylius project:
<?php
declare(strict_types=1);
namespace App\Controller\Mollie;
use Sylius\Component\Order\Context\CartContextInterface;
use Sylius\Component\Order\Context\CartNotFoundException;
use Sylius\MolliePlugin\Controller\Shop\QrCodeAction;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
final class SecureQrCodeAction
{
private const OWNED_ORDER_IDS_SESSION_KEY = 'sylius_mollie.owned_order_ids';
public function __construct(
private readonly QrCodeAction $inner,
private readonly CartContextInterface $cartContext,
) {
}
public function fetchQrCodeFromOrder(Request $request): JsonResponse
{
$orderId = $request->get('orderId');
try {
$cart = $this->cartContext->getCart();
} catch (CartNotFoundException) {
$cart = null;
}
if (null !== $orderId && (null === $cart || (string) $cart->getId() !== (string) $orderId)) {
return new JsonResponse([], Response::HTTP_FORBIDDEN);
}
if (null !== $cart && null !== $cart->getId() && $request->hasSession()) {
$session = $request->getSession();
$ownedIds = $session->get(self::OWNED_ORDER_IDS_SESSION_KEY, []);
$ownedIds[(string) $cart->getId()] = true;
$session->set(self::OWNED_ORDER_IDS_SESSION_KEY, $ownedIds);
}
return $this->inner->fetchQrCodeFromOrder($request);
}
public function createPayment(Request $request): Response
{
return $this->inner->createPayment($request);
}
public function removeQrCodeFromOrder(Request $request): JsonResponse
{
return $this->inner->removeQrCodeFromOrder($request);
}
}
Both decorators keep @.inner and only add an ownership check on orderId before handing
the request to the original action, so createPayment, removeQrCodeFromOrder and the
thank-you redirect all keep their original behaviour and the front-end contract is unchanged.
Sylius Mollie Plugin vulnerable to payment status forgery via the payment webhook
7.5
/ 10
High
Network
Low
None
None
Unchanged
None
High
None
Impact
The shop payment webhook POST /{_locale}/update-payment (route
sylius_mollie_shop_payment_webhook) accepts two independent, attacker-controlled
parameters: id (the Mollie payment ID, verified against Mollie's API) and orderId (the
Sylius order ID, read directly from the database). The handler never verifies that the
Mollie payment belongs to the referenced order.
An unauthenticated attacker who holds any valid paid Mollie payment ID, for example
from a EUR 1 order they placed themselves, can submit it together with any victim
orderId. The victim's order payment is then transitioned to completed (or any other
Mollie-derived state) without any funds being transferred for that order. Sylius order IDs
are sequential integers, and the endpoint requires no authentication, CSRF token or rate
limiting, so the attack scales trivially across all pending orders.
Patches
Fixed in versions 2.2.8, 3.2.4 and 3.3.1. The webhook now binds the payment to
the order: it reads the Mollie payment ID stored server-side for that order when the payment
was created and compares it to the incoming Mollie payment ID. On mismatch the request is
acknowledged with HTTP 200 and no state change is applied. HTTP 200 is intentional,
because Mollie retries the webhook on any non-2xx response.
The stored ID lives in one of two places depending on the checkout flow, and the fix reads
both of them (mirroring CaptureAction):
payment.getDetails()['payment_mollie_id'] for the standard Shop API and Apple Pay Direct
flows, stored in CreatePaymentAction.
order.getMolliePaymentId() for the QR-code flow, which stores the ID on the order itself
(QrCodeAction).
Reading only the payment details would reject legitimate QR-code payments, because their
payment details carry no payment_mollie_id, so both sources must be consulted.
Workarounds
If you cannot upgrade immediately, patch the vulnerability at the project level by
decorating the plugin's webhook controller. The decorator checks that the incoming Mollie
id matches the id stored for that order before handing over to the original controller,
so no plugin behaviour (state machine, logging) is lost and no extra Mollie API call is
made. Works on both 2.2 and 3.x.
Step 1. Create the decorator
Create src/Controller/Mollie/SecurePaymentWebhookController.php in your Sylius project:
<?php
declare(strict_types=1);
namespace App\Controller\Mollie;
use Sylius\Component\Core\Model\OrderInterface;
use Sylius\Component\Order\Repository\OrderRepositoryInterface;
use Sylius\MolliePlugin\Controller\Shop\PaymentWebhookController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
final class SecurePaymentWebhookController
{
public function __construct(
private readonly PaymentWebhookController $inner,
private readonly OrderRepositoryInterface $orderRepository,
) {
}
public function __invoke(Request $request): Response
{
$orderId = $request->get('orderId');
$molliePaymentId = $request->get('id');
if (null === $orderId || null === $molliePaymentId) {
return ($this->inner)($request);
}
/** @var OrderInterface|null $order */
$order = $this->orderRepository->findOneBy(['id' => $orderId]);
if (null === $order) {
return ($this->inner)($request);
}
$storedMollieId = $this->resolveStoredMollieId($order);
// Reject any webhook whose Mollie id does not match the one stored for this order.
// 200 is intentional: Mollie retries on any non-2xx response.
if (null === $storedMollieId || $storedMollieId !== (string) $molliePaymentId) {
return new JsonResponse(null, Response::HTTP_OK);
}
return ($this->inner)($request);
}
private function resolveStoredMollieId(OrderInterface $order): ?string
{
$payment = $order->getLastPayment();
$fromDetails = $payment?->getDetails()['payment_mollie_id'] ?? null;
if (null !== $fromDetails && '' !== $fromDetails) {
return (string) $fromDetails;
}
// QR-code flow stores the Mollie id on the order itself.
if (method_exists($order, 'getMolliePaymentId')) {
$fromOrder = $order->getMolliePaymentId();
if (null !== $fromOrder && '' !== $fromOrder) {
return (string) $fromOrder;
}
}
return null;
}
}
decorates: keeps the original service ID, so the route
_controller: sylius_mollie.controller.shop.payment_webhook keeps working with no route
changes. @.inner is the original plugin controller.
Sylius Mollie Plugin has unauthenticated IDOR that leaks order token and customer PII
6.5
/ 10
Medium
Network
Low
None
None
Unchanged
Low
None
Low
Impact
Two unauthenticated Mollie shop endpoints look up orders by a sequential integer orderId
with no ownership or session check. Chained, they expose customer PII.
GET /{_locale}/thank-you (PageRedirectController::thankYouAction, route
sylius_mollie_shop_thank_you_page_redirect) loads the order with findOneBy(['id' => $orderId])
and returns a 302 whose Location header carries that order's tokenValue. Any orderId
thus yields that order's token. A non-existent id dereferences null and returns a 500. The
handler also writes the raw orderId into the session.
GET /{_locale}/get-code (QrCodeAction::fetchQrCodeFromOrder, route
sylius_mollie_shop_get_qr_code) runs the same lookup and returns the order's QR code and id
as JSON, ignoring the session cart; this is where the front-end got the integer id. A bad id
500s here too.
That tokenValue is the order's only access control. Passed to the Sylius core page
GET /{_locale}/register-after-checkout/{tokenValue} it returns a form pre-filled with the
customer's first name, last name and email. The full attack: enumerate orderId, read the
token from the redirect, read the PII, at roughly a 1-in-71 hit rate for guest orders.
register-after-checkout is Sylius core, not the plugin, and trusts the token by design, so
the leak is what must be fixed.
None of the plugin endpoints require a login, session or CSRF token.
Patches
Fixed in 2.2.8, 3.2.4 and 3.3.1.
Workarounds
If you cannot upgrade immediately, patch both endpoints at the project level by decorating
the plugin controllers. The decorators enforce ownership before delegating to the original
controller, so no plugin behaviour is lost. They keep the original orderId request contract,
so no front-end or asset changes are required. Works on both 2.2 and 3.x.
Step 1. Decorate the QR code controller
Create src/Controller/Mollie/SecureQrCodeAction.php in your Sylius project:
<?php
declare(strict_types=1);
namespace App\Controller\Mollie;
use Sylius\Component\Order\Context\CartContextInterface;
use Sylius\Component\Order\Context\CartNotFoundException;
use Sylius\MolliePlugin\Controller\Shop\QrCodeAction;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
final class SecureQrCodeAction
{
private const OWNED_ORDER_IDS_SESSION_KEY = 'sylius_mollie.owned_order_ids';
public function __construct(
private readonly QrCodeAction $inner,
private readonly CartContextInterface $cartContext,
) {
}
public function fetchQrCodeFromOrder(Request $request): JsonResponse
{
$orderId = $request->get('orderId');
try {
$cart = $this->cartContext->getCart();
} catch (CartNotFoundException) {
$cart = null;
}
if (null !== $orderId && (null === $cart || (string) $cart->getId() !== (string) $orderId)) {
return new JsonResponse([], Response::HTTP_FORBIDDEN);
}
if (null !== $cart && null !== $cart->getId() && $request->hasSession()) {
$session = $request->getSession();
$ownedIds = $session->get(self::OWNED_ORDER_IDS_SESSION_KEY, []);
$ownedIds[(string) $cart->getId()] = true;
$session->set(self::OWNED_ORDER_IDS_SESSION_KEY, $ownedIds);
}
return $this->inner->fetchQrCodeFromOrder($request);
}
public function createPayment(Request $request): Response
{
return $this->inner->createPayment($request);
}
public function removeQrCodeFromOrder(Request $request): JsonResponse
{
return $this->inner->removeQrCodeFromOrder($request);
}
}
Both decorators keep @.inner and only add an ownership check on orderId before handing
the request to the original action, so createPayment, removeQrCodeFromOrder and the
thank-you redirect all keep their original behaviour and the front-end contract is unchanged.
Sylius Mollie Plugin vulnerable to payment status forgery via the payment webhook
7.5
/ 10
High
Network
Low
None
None
Unchanged
None
High
None
Impact
The shop payment webhook POST /{_locale}/update-payment (route
sylius_mollie_shop_payment_webhook) accepts two independent, attacker-controlled
parameters: id (the Mollie payment ID, verified against Mollie's API) and orderId (the
Sylius order ID, read directly from the database). The handler never verifies that the
Mollie payment belongs to the referenced order.
An unauthenticated attacker who holds any valid paid Mollie payment ID, for example
from a EUR 1 order they placed themselves, can submit it together with any victim
orderId. The victim's order payment is then transitioned to completed (or any other
Mollie-derived state) without any funds being transferred for that order. Sylius order IDs
are sequential integers, and the endpoint requires no authentication, CSRF token or rate
limiting, so the attack scales trivially across all pending orders.
Patches
Fixed in versions 2.2.8, 3.2.4 and 3.3.1. The webhook now binds the payment to
the order: it reads the Mollie payment ID stored server-side for that order when the payment
was created and compares it to the incoming Mollie payment ID. On mismatch the request is
acknowledged with HTTP 200 and no state change is applied. HTTP 200 is intentional,
because Mollie retries the webhook on any non-2xx response.
The stored ID lives in one of two places depending on the checkout flow, and the fix reads
both of them (mirroring CaptureAction):
payment.getDetails()['payment_mollie_id'] for the standard Shop API and Apple Pay Direct
flows, stored in CreatePaymentAction.
order.getMolliePaymentId() for the QR-code flow, which stores the ID on the order itself
(QrCodeAction).
Reading only the payment details would reject legitimate QR-code payments, because their
payment details carry no payment_mollie_id, so both sources must be consulted.
Workarounds
If you cannot upgrade immediately, patch the vulnerability at the project level by
decorating the plugin's webhook controller. The decorator checks that the incoming Mollie
id matches the id stored for that order before handing over to the original controller,
so no plugin behaviour (state machine, logging) is lost and no extra Mollie API call is
made. Works on both 2.2 and 3.x.
Step 1. Create the decorator
Create src/Controller/Mollie/SecurePaymentWebhookController.php in your Sylius project:
<?php
declare(strict_types=1);
namespace App\Controller\Mollie;
use Sylius\Component\Core\Model\OrderInterface;
use Sylius\Component\Order\Repository\OrderRepositoryInterface;
use Sylius\MolliePlugin\Controller\Shop\PaymentWebhookController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
final class SecurePaymentWebhookController
{
public function __construct(
private readonly PaymentWebhookController $inner,
private readonly OrderRepositoryInterface $orderRepository,
) {
}
public function __invoke(Request $request): Response
{
$orderId = $request->get('orderId');
$molliePaymentId = $request->get('id');
if (null === $orderId || null === $molliePaymentId) {
return ($this->inner)($request);
}
/** @var OrderInterface|null $order */
$order = $this->orderRepository->findOneBy(['id' => $orderId]);
if (null === $order) {
return ($this->inner)($request);
}
$storedMollieId = $this->resolveStoredMollieId($order);
// Reject any webhook whose Mollie id does not match the one stored for this order.
// 200 is intentional: Mollie retries on any non-2xx response.
if (null === $storedMollieId || $storedMollieId !== (string) $molliePaymentId) {
return new JsonResponse(null, Response::HTTP_OK);
}
return ($this->inner)($request);
}
private function resolveStoredMollieId(OrderInterface $order): ?string
{
$payment = $order->getLastPayment();
$fromDetails = $payment?->getDetails()['payment_mollie_id'] ?? null;
if (null !== $fromDetails && '' !== $fromDetails) {
return (string) $fromDetails;
}
// QR-code flow stores the Mollie id on the order itself.
if (method_exists($order, 'getMolliePaymentId')) {
$fromOrder = $order->getMolliePaymentId();
if (null !== $fromOrder && '' !== $fromOrder) {
return (string) $fromOrder;
}
}
return null;
}
}
decorates: keeps the original service ID, so the route
_controller: sylius_mollie.controller.shop.payment_webhook keeps working with no route
changes. @.inner is the original plugin controller.
Sylius Mollie Plugin has unauthenticated IDOR that leaks order token and customer PII
6.5
/ 10
Medium
Network
Low
None
None
Unchanged
Low
None
Low
Impact
Two unauthenticated Mollie shop endpoints look up orders by a sequential integer orderId
with no ownership or session check. Chained, they expose customer PII.
GET /{_locale}/thank-you (PageRedirectController::thankYouAction, route
sylius_mollie_shop_thank_you_page_redirect) loads the order with findOneBy(['id' => $orderId])
and returns a 302 whose Location header carries that order's tokenValue. Any orderId
thus yields that order's token. A non-existent id dereferences null and returns a 500. The
handler also writes the raw orderId into the session.
GET /{_locale}/get-code (QrCodeAction::fetchQrCodeFromOrder, route
sylius_mollie_shop_get_qr_code) runs the same lookup and returns the order's QR code and id
as JSON, ignoring the session cart; this is where the front-end got the integer id. A bad id
500s here too.
That tokenValue is the order's only access control. Passed to the Sylius core page
GET /{_locale}/register-after-checkout/{tokenValue} it returns a form pre-filled with the
customer's first name, last name and email. The full attack: enumerate orderId, read the
token from the redirect, read the PII, at roughly a 1-in-71 hit rate for guest orders.
register-after-checkout is Sylius core, not the plugin, and trusts the token by design, so
the leak is what must be fixed.
None of the plugin endpoints require a login, session or CSRF token.
Patches
Fixed in 2.2.8, 3.2.4 and 3.3.1.
Workarounds
If you cannot upgrade immediately, patch both endpoints at the project level by decorating
the plugin controllers. The decorators enforce ownership before delegating to the original
controller, so no plugin behaviour is lost. They keep the original orderId request contract,
so no front-end or asset changes are required. Works on both 2.2 and 3.x.
Step 1. Decorate the QR code controller
Create src/Controller/Mollie/SecureQrCodeAction.php in your Sylius project:
<?php
declare(strict_types=1);
namespace App\Controller\Mollie;
use Sylius\Component\Order\Context\CartContextInterface;
use Sylius\Component\Order\Context\CartNotFoundException;
use Sylius\MolliePlugin\Controller\Shop\QrCodeAction;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
final class SecureQrCodeAction
{
private const OWNED_ORDER_IDS_SESSION_KEY = 'sylius_mollie.owned_order_ids';
public function __construct(
private readonly QrCodeAction $inner,
private readonly CartContextInterface $cartContext,
) {
}
public function fetchQrCodeFromOrder(Request $request): JsonResponse
{
$orderId = $request->get('orderId');
try {
$cart = $this->cartContext->getCart();
} catch (CartNotFoundException) {
$cart = null;
}
if (null !== $orderId && (null === $cart || (string) $cart->getId() !== (string) $orderId)) {
return new JsonResponse([], Response::HTTP_FORBIDDEN);
}
if (null !== $cart && null !== $cart->getId() && $request->hasSession()) {
$session = $request->getSession();
$ownedIds = $session->get(self::OWNED_ORDER_IDS_SESSION_KEY, []);
$ownedIds[(string) $cart->getId()] = true;
$session->set(self::OWNED_ORDER_IDS_SESSION_KEY, $ownedIds);
}
return $this->inner->fetchQrCodeFromOrder($request);
}
public function createPayment(Request $request): Response
{
return $this->inner->createPayment($request);
}
public function removeQrCodeFromOrder(Request $request): JsonResponse
{
return $this->inner->removeQrCodeFromOrder($request);
}
}
Both decorators keep @.inner and only add an ownership check on orderId before handing
the request to the original action, so createPayment, removeQrCodeFromOrder and the
thank-you redirect all keep their original behaviour and the front-end contract is unchanged.
Sylius Mollie Plugin vulnerable to payment status forgery via the payment webhook
7.5
/ 10
High
Network
Low
None
None
Unchanged
None
High
None
Impact
The shop payment webhook POST /{_locale}/update-payment (route
sylius_mollie_shop_payment_webhook) accepts two independent, attacker-controlled
parameters: id (the Mollie payment ID, verified against Mollie's API) and orderId (the
Sylius order ID, read directly from the database). The handler never verifies that the
Mollie payment belongs to the referenced order.
An unauthenticated attacker who holds any valid paid Mollie payment ID, for example
from a EUR 1 order they placed themselves, can submit it together with any victim
orderId. The victim's order payment is then transitioned to completed (or any other
Mollie-derived state) without any funds being transferred for that order. Sylius order IDs
are sequential integers, and the endpoint requires no authentication, CSRF token or rate
limiting, so the attack scales trivially across all pending orders.
Patches
Fixed in versions 2.2.8, 3.2.4 and 3.3.1. The webhook now binds the payment to
the order: it reads the Mollie payment ID stored server-side for that order when the payment
was created and compares it to the incoming Mollie payment ID. On mismatch the request is
acknowledged with HTTP 200 and no state change is applied. HTTP 200 is intentional,
because Mollie retries the webhook on any non-2xx response.
The stored ID lives in one of two places depending on the checkout flow, and the fix reads
both of them (mirroring CaptureAction):
payment.getDetails()['payment_mollie_id'] for the standard Shop API and Apple Pay Direct
flows, stored in CreatePaymentAction.
order.getMolliePaymentId() for the QR-code flow, which stores the ID on the order itself
(QrCodeAction).
Reading only the payment details would reject legitimate QR-code payments, because their
payment details carry no payment_mollie_id, so both sources must be consulted.
Workarounds
If you cannot upgrade immediately, patch the vulnerability at the project level by
decorating the plugin's webhook controller. The decorator checks that the incoming Mollie
id matches the id stored for that order before handing over to the original controller,
so no plugin behaviour (state machine, logging) is lost and no extra Mollie API call is
made. Works on both 2.2 and 3.x.
Step 1. Create the decorator
Create src/Controller/Mollie/SecurePaymentWebhookController.php in your Sylius project:
<?php
declare(strict_types=1);
namespace App\Controller\Mollie;
use Sylius\Component\Core\Model\OrderInterface;
use Sylius\Component\Order\Repository\OrderRepositoryInterface;
use Sylius\MolliePlugin\Controller\Shop\PaymentWebhookController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
final class SecurePaymentWebhookController
{
public function __construct(
private readonly PaymentWebhookController $inner,
private readonly OrderRepositoryInterface $orderRepository,
) {
}
public function __invoke(Request $request): Response
{
$orderId = $request->get('orderId');
$molliePaymentId = $request->get('id');
if (null === $orderId || null === $molliePaymentId) {
return ($this->inner)($request);
}
/** @var OrderInterface|null $order */
$order = $this->orderRepository->findOneBy(['id' => $orderId]);
if (null === $order) {
return ($this->inner)($request);
}
$storedMollieId = $this->resolveStoredMollieId($order);
// Reject any webhook whose Mollie id does not match the one stored for this order.
// 200 is intentional: Mollie retries on any non-2xx response.
if (null === $storedMollieId || $storedMollieId !== (string) $molliePaymentId) {
return new JsonResponse(null, Response::HTTP_OK);
}
return ($this->inner)($request);
}
private function resolveStoredMollieId(OrderInterface $order): ?string
{
$payment = $order->getLastPayment();
$fromDetails = $payment?->getDetails()['payment_mollie_id'] ?? null;
if (null !== $fromDetails && '' !== $fromDetails) {
return (string) $fromDetails;
}
// QR-code flow stores the Mollie id on the order itself.
if (method_exists($order, 'getMolliePaymentId')) {
$fromOrder = $order->getMolliePaymentId();
if (null !== $fromOrder && '' !== $fromOrder) {
return (string) $fromOrder;
}
}
return null;
}
}
decorates: keeps the original service ID, so the route
_controller: sylius_mollie.controller.shop.payment_webhook keeps working with no route
changes. @.inner is the original plugin controller.
Sylius Mollie Plugin has unauthenticated IDOR that leaks order token and customer PII
6.5
/ 10
Medium
Network
Low
None
None
Unchanged
Low
None
Low
Impact
Two unauthenticated Mollie shop endpoints look up orders by a sequential integer orderId
with no ownership or session check. Chained, they expose customer PII.
GET /{_locale}/thank-you (PageRedirectController::thankYouAction, route
sylius_mollie_shop_thank_you_page_redirect) loads the order with findOneBy(['id' => $orderId])
and returns a 302 whose Location header carries that order's tokenValue. Any orderId
thus yields that order's token. A non-existent id dereferences null and returns a 500. The
handler also writes the raw orderId into the session.
GET /{_locale}/get-code (QrCodeAction::fetchQrCodeFromOrder, route
sylius_mollie_shop_get_qr_code) runs the same lookup and returns the order's QR code and id
as JSON, ignoring the session cart; this is where the front-end got the integer id. A bad id
500s here too.
That tokenValue is the order's only access control. Passed to the Sylius core page
GET /{_locale}/register-after-checkout/{tokenValue} it returns a form pre-filled with the
customer's first name, last name and email. The full attack: enumerate orderId, read the
token from the redirect, read the PII, at roughly a 1-in-71 hit rate for guest orders.
register-after-checkout is Sylius core, not the plugin, and trusts the token by design, so
the leak is what must be fixed.
None of the plugin endpoints require a login, session or CSRF token.
Patches
Fixed in 2.2.8, 3.2.4 and 3.3.1.
Workarounds
If you cannot upgrade immediately, patch both endpoints at the project level by decorating
the plugin controllers. The decorators enforce ownership before delegating to the original
controller, so no plugin behaviour is lost. They keep the original orderId request contract,
so no front-end or asset changes are required. Works on both 2.2 and 3.x.
Step 1. Decorate the QR code controller
Create src/Controller/Mollie/SecureQrCodeAction.php in your Sylius project:
<?php
declare(strict_types=1);
namespace App\Controller\Mollie;
use Sylius\Component\Order\Context\CartContextInterface;
use Sylius\Component\Order\Context\CartNotFoundException;
use Sylius\MolliePlugin\Controller\Shop\QrCodeAction;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
final class SecureQrCodeAction
{
private const OWNED_ORDER_IDS_SESSION_KEY = 'sylius_mollie.owned_order_ids';
public function __construct(
private readonly QrCodeAction $inner,
private readonly CartContextInterface $cartContext,
) {
}
public function fetchQrCodeFromOrder(Request $request): JsonResponse
{
$orderId = $request->get('orderId');
try {
$cart = $this->cartContext->getCart();
} catch (CartNotFoundException) {
$cart = null;
}
if (null !== $orderId && (null === $cart || (string) $cart->getId() !== (string) $orderId)) {
return new JsonResponse([], Response::HTTP_FORBIDDEN);
}
if (null !== $cart && null !== $cart->getId() && $request->hasSession()) {
$session = $request->getSession();
$ownedIds = $session->get(self::OWNED_ORDER_IDS_SESSION_KEY, []);
$ownedIds[(string) $cart->getId()] = true;
$session->set(self::OWNED_ORDER_IDS_SESSION_KEY, $ownedIds);
}
return $this->inner->fetchQrCodeFromOrder($request);
}
public function createPayment(Request $request): Response
{
return $this->inner->createPayment($request);
}
public function removeQrCodeFromOrder(Request $request): JsonResponse
{
return $this->inner->removeQrCodeFromOrder($request);
}
}
Both decorators keep @.inner and only add an ownership check on orderId before handing
the request to the original action, so createPayment, removeQrCodeFromOrder and the
thank-you redirect all keep their original behaviour and the front-end contract is unchanged.
Sylius Mollie Plugin vulnerable to payment status forgery via the payment webhook
7.5
/ 10
High
Network
Low
None
None
Unchanged
None
High
None
Impact
The shop payment webhook POST /{_locale}/update-payment (route
sylius_mollie_shop_payment_webhook) accepts two independent, attacker-controlled
parameters: id (the Mollie payment ID, verified against Mollie's API) and orderId (the
Sylius order ID, read directly from the database). The handler never verifies that the
Mollie payment belongs to the referenced order.
An unauthenticated attacker who holds any valid paid Mollie payment ID, for example
from a EUR 1 order they placed themselves, can submit it together with any victim
orderId. The victim's order payment is then transitioned to completed (or any other
Mollie-derived state) without any funds being transferred for that order. Sylius order IDs
are sequential integers, and the endpoint requires no authentication, CSRF token or rate
limiting, so the attack scales trivially across all pending orders.
Patches
Fixed in versions 2.2.8, 3.2.4 and 3.3.1. The webhook now binds the payment to
the order: it reads the Mollie payment ID stored server-side for that order when the payment
was created and compares it to the incoming Mollie payment ID. On mismatch the request is
acknowledged with HTTP 200 and no state change is applied. HTTP 200 is intentional,
because Mollie retries the webhook on any non-2xx response.
The stored ID lives in one of two places depending on the checkout flow, and the fix reads
both of them (mirroring CaptureAction):
payment.getDetails()['payment_mollie_id'] for the standard Shop API and Apple Pay Direct
flows, stored in CreatePaymentAction.
order.getMolliePaymentId() for the QR-code flow, which stores the ID on the order itself
(QrCodeAction).
Reading only the payment details would reject legitimate QR-code payments, because their
payment details carry no payment_mollie_id, so both sources must be consulted.
Workarounds
If you cannot upgrade immediately, patch the vulnerability at the project level by
decorating the plugin's webhook controller. The decorator checks that the incoming Mollie
id matches the id stored for that order before handing over to the original controller,
so no plugin behaviour (state machine, logging) is lost and no extra Mollie API call is
made. Works on both 2.2 and 3.x.
Step 1. Create the decorator
Create src/Controller/Mollie/SecurePaymentWebhookController.php in your Sylius project:
<?php
declare(strict_types=1);
namespace App\Controller\Mollie;
use Sylius\Component\Core\Model\OrderInterface;
use Sylius\Component\Order\Repository\OrderRepositoryInterface;
use Sylius\MolliePlugin\Controller\Shop\PaymentWebhookController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
final class SecurePaymentWebhookController
{
public function __construct(
private readonly PaymentWebhookController $inner,
private readonly OrderRepositoryInterface $orderRepository,
) {
}
public function __invoke(Request $request): Response
{
$orderId = $request->get('orderId');
$molliePaymentId = $request->get('id');
if (null === $orderId || null === $molliePaymentId) {
return ($this->inner)($request);
}
/** @var OrderInterface|null $order */
$order = $this->orderRepository->findOneBy(['id' => $orderId]);
if (null === $order) {
return ($this->inner)($request);
}
$storedMollieId = $this->resolveStoredMollieId($order);
// Reject any webhook whose Mollie id does not match the one stored for this order.
// 200 is intentional: Mollie retries on any non-2xx response.
if (null === $storedMollieId || $storedMollieId !== (string) $molliePaymentId) {
return new JsonResponse(null, Response::HTTP_OK);
}
return ($this->inner)($request);
}
private function resolveStoredMollieId(OrderInterface $order): ?string
{
$payment = $order->getLastPayment();
$fromDetails = $payment?->getDetails()['payment_mollie_id'] ?? null;
if (null !== $fromDetails && '' !== $fromDetails) {
return (string) $fromDetails;
}
// QR-code flow stores the Mollie id on the order itself.
if (method_exists($order, 'getMolliePaymentId')) {
$fromOrder = $order->getMolliePaymentId();
if (null !== $fromOrder && '' !== $fromOrder) {
return (string) $fromOrder;
}
}
return null;
}
}
decorates: keeps the original service ID, so the route
_controller: sylius_mollie.controller.shop.payment_webhook keeps working with no route
changes. @.inner is the original plugin controller.
Sylius Mollie Plugin has unauthenticated IDOR that leaks order token and customer PII
6.5
/ 10
Medium
Network
Low
None
None
Unchanged
Low
None
Low
Impact
Two unauthenticated Mollie shop endpoints look up orders by a sequential integer orderId
with no ownership or session check. Chained, they expose customer PII.
GET /{_locale}/thank-you (PageRedirectController::thankYouAction, route
sylius_mollie_shop_thank_you_page_redirect) loads the order with findOneBy(['id' => $orderId])
and returns a 302 whose Location header carries that order's tokenValue. Any orderId
thus yields that order's token. A non-existent id dereferences null and returns a 500. The
handler also writes the raw orderId into the session.
GET /{_locale}/get-code (QrCodeAction::fetchQrCodeFromOrder, route
sylius_mollie_shop_get_qr_code) runs the same lookup and returns the order's QR code and id
as JSON, ignoring the session cart; this is where the front-end got the integer id. A bad id
500s here too.
That tokenValue is the order's only access control. Passed to the Sylius core page
GET /{_locale}/register-after-checkout/{tokenValue} it returns a form pre-filled with the
customer's first name, last name and email. The full attack: enumerate orderId, read the
token from the redirect, read the PII, at roughly a 1-in-71 hit rate for guest orders.
register-after-checkout is Sylius core, not the plugin, and trusts the token by design, so
the leak is what must be fixed.
None of the plugin endpoints require a login, session or CSRF token.
Patches
Fixed in 2.2.8, 3.2.4 and 3.3.1.
Workarounds
If you cannot upgrade immediately, patch both endpoints at the project level by decorating
the plugin controllers. The decorators enforce ownership before delegating to the original
controller, so no plugin behaviour is lost. They keep the original orderId request contract,
so no front-end or asset changes are required. Works on both 2.2 and 3.x.
Step 1. Decorate the QR code controller
Create src/Controller/Mollie/SecureQrCodeAction.php in your Sylius project:
<?php
declare(strict_types=1);
namespace App\Controller\Mollie;
use Sylius\Component\Order\Context\CartContextInterface;
use Sylius\Component\Order\Context\CartNotFoundException;
use Sylius\MolliePlugin\Controller\Shop\QrCodeAction;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
final class SecureQrCodeAction
{
private const OWNED_ORDER_IDS_SESSION_KEY = 'sylius_mollie.owned_order_ids';
public function __construct(
private readonly QrCodeAction $inner,
private readonly CartContextInterface $cartContext,
) {
}
public function fetchQrCodeFromOrder(Request $request): JsonResponse
{
$orderId = $request->get('orderId');
try {
$cart = $this->cartContext->getCart();
} catch (CartNotFoundException) {
$cart = null;
}
if (null !== $orderId && (null === $cart || (string) $cart->getId() !== (string) $orderId)) {
return new JsonResponse([], Response::HTTP_FORBIDDEN);
}
if (null !== $cart && null !== $cart->getId() && $request->hasSession()) {
$session = $request->getSession();
$ownedIds = $session->get(self::OWNED_ORDER_IDS_SESSION_KEY, []);
$ownedIds[(string) $cart->getId()] = true;
$session->set(self::OWNED_ORDER_IDS_SESSION_KEY, $ownedIds);
}
return $this->inner->fetchQrCodeFromOrder($request);
}
public function createPayment(Request $request): Response
{
return $this->inner->createPayment($request);
}
public function removeQrCodeFromOrder(Request $request): JsonResponse
{
return $this->inner->removeQrCodeFromOrder($request);
}
}
Both decorators keep @.inner and only add an ownership check on orderId before handing
the request to the original action, so createPayment, removeQrCodeFromOrder and the
thank-you redirect all keep their original behaviour and the front-end contract is unchanged.
Sylius Mollie Plugin vulnerable to payment status forgery via the payment webhook
7.5
/ 10
High
Network
Low
None
None
Unchanged
None
High
None
Impact
The shop payment webhook POST /{_locale}/update-payment (route
sylius_mollie_shop_payment_webhook) accepts two independent, attacker-controlled
parameters: id (the Mollie payment ID, verified against Mollie's API) and orderId (the
Sylius order ID, read directly from the database). The handler never verifies that the
Mollie payment belongs to the referenced order.
An unauthenticated attacker who holds any valid paid Mollie payment ID, for example
from a EUR 1 order they placed themselves, can submit it together with any victim
orderId. The victim's order payment is then transitioned to completed (or any other
Mollie-derived state) without any funds being transferred for that order. Sylius order IDs
are sequential integers, and the endpoint requires no authentication, CSRF token or rate
limiting, so the attack scales trivially across all pending orders.
Patches
Fixed in versions 2.2.8, 3.2.4 and 3.3.1. The webhook now binds the payment to
the order: it reads the Mollie payment ID stored server-side for that order when the payment
was created and compares it to the incoming Mollie payment ID. On mismatch the request is
acknowledged with HTTP 200 and no state change is applied. HTTP 200 is intentional,
because Mollie retries the webhook on any non-2xx response.
The stored ID lives in one of two places depending on the checkout flow, and the fix reads
both of them (mirroring CaptureAction):
payment.getDetails()['payment_mollie_id'] for the standard Shop API and Apple Pay Direct
flows, stored in CreatePaymentAction.
order.getMolliePaymentId() for the QR-code flow, which stores the ID on the order itself
(QrCodeAction).
Reading only the payment details would reject legitimate QR-code payments, because their
payment details carry no payment_mollie_id, so both sources must be consulted.
Workarounds
If you cannot upgrade immediately, patch the vulnerability at the project level by
decorating the plugin's webhook controller. The decorator checks that the incoming Mollie
id matches the id stored for that order before handing over to the original controller,
so no plugin behaviour (state machine, logging) is lost and no extra Mollie API call is
made. Works on both 2.2 and 3.x.
Step 1. Create the decorator
Create src/Controller/Mollie/SecurePaymentWebhookController.php in your Sylius project:
<?php
declare(strict_types=1);
namespace App\Controller\Mollie;
use Sylius\Component\Core\Model\OrderInterface;
use Sylius\Component\Order\Repository\OrderRepositoryInterface;
use Sylius\MolliePlugin\Controller\Shop\PaymentWebhookController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
final class SecurePaymentWebhookController
{
public function __construct(
private readonly PaymentWebhookController $inner,
private readonly OrderRepositoryInterface $orderRepository,
) {
}
public function __invoke(Request $request): Response
{
$orderId = $request->get('orderId');
$molliePaymentId = $request->get('id');
if (null === $orderId || null === $molliePaymentId) {
return ($this->inner)($request);
}
/** @var OrderInterface|null $order */
$order = $this->orderRepository->findOneBy(['id' => $orderId]);
if (null === $order) {
return ($this->inner)($request);
}
$storedMollieId = $this->resolveStoredMollieId($order);
// Reject any webhook whose Mollie id does not match the one stored for this order.
// 200 is intentional: Mollie retries on any non-2xx response.
if (null === $storedMollieId || $storedMollieId !== (string) $molliePaymentId) {
return new JsonResponse(null, Response::HTTP_OK);
}
return ($this->inner)($request);
}
private function resolveStoredMollieId(OrderInterface $order): ?string
{
$payment = $order->getLastPayment();
$fromDetails = $payment?->getDetails()['payment_mollie_id'] ?? null;
if (null !== $fromDetails && '' !== $fromDetails) {
return (string) $fromDetails;
}
// QR-code flow stores the Mollie id on the order itself.
if (method_exists($order, 'getMolliePaymentId')) {
$fromOrder = $order->getMolliePaymentId();
if (null !== $fromOrder && '' !== $fromOrder) {
return (string) $fromOrder;
}
}
return null;
}
}
decorates: keeps the original service ID, so the route
_controller: sylius_mollie.controller.shop.payment_webhook keeps working with no route
changes. @.inner is the original plugin controller.
Sylius Mollie Plugin has unauthenticated IDOR that leaks order token and customer PII
6.5
/ 10
Medium
Network
Low
None
None
Unchanged
Low
None
Low
Impact
Two unauthenticated Mollie shop endpoints look up orders by a sequential integer orderId
with no ownership or session check. Chained, they expose customer PII.
GET /{_locale}/thank-you (PageRedirectController::thankYouAction, route
sylius_mollie_shop_thank_you_page_redirect) loads the order with findOneBy(['id' => $orderId])
and returns a 302 whose Location header carries that order's tokenValue. Any orderId
thus yields that order's token. A non-existent id dereferences null and returns a 500. The
handler also writes the raw orderId into the session.
GET /{_locale}/get-code (QrCodeAction::fetchQrCodeFromOrder, route
sylius_mollie_shop_get_qr_code) runs the same lookup and returns the order's QR code and id
as JSON, ignoring the session cart; this is where the front-end got the integer id. A bad id
500s here too.
That tokenValue is the order's only access control. Passed to the Sylius core page
GET /{_locale}/register-after-checkout/{tokenValue} it returns a form pre-filled with the
customer's first name, last name and email. The full attack: enumerate orderId, read the
token from the redirect, read the PII, at roughly a 1-in-71 hit rate for guest orders.
register-after-checkout is Sylius core, not the plugin, and trusts the token by design, so
the leak is what must be fixed.
None of the plugin endpoints require a login, session or CSRF token.
Patches
Fixed in 2.2.8, 3.2.4 and 3.3.1.
Workarounds
If you cannot upgrade immediately, patch both endpoints at the project level by decorating
the plugin controllers. The decorators enforce ownership before delegating to the original
controller, so no plugin behaviour is lost. They keep the original orderId request contract,
so no front-end or asset changes are required. Works on both 2.2 and 3.x.
Step 1. Decorate the QR code controller
Create src/Controller/Mollie/SecureQrCodeAction.php in your Sylius project:
<?php
declare(strict_types=1);
namespace App\Controller\Mollie;
use Sylius\Component\Order\Context\CartContextInterface;
use Sylius\Component\Order\Context\CartNotFoundException;
use Sylius\MolliePlugin\Controller\Shop\QrCodeAction;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
final class SecureQrCodeAction
{
private const OWNED_ORDER_IDS_SESSION_KEY = 'sylius_mollie.owned_order_ids';
public function __construct(
private readonly QrCodeAction $inner,
private readonly CartContextInterface $cartContext,
) {
}
public function fetchQrCodeFromOrder(Request $request): JsonResponse
{
$orderId = $request->get('orderId');
try {
$cart = $this->cartContext->getCart();
} catch (CartNotFoundException) {
$cart = null;
}
if (null !== $orderId && (null === $cart || (string) $cart->getId() !== (string) $orderId)) {
return new JsonResponse([], Response::HTTP_FORBIDDEN);
}
if (null !== $cart && null !== $cart->getId() && $request->hasSession()) {
$session = $request->getSession();
$ownedIds = $session->get(self::OWNED_ORDER_IDS_SESSION_KEY, []);
$ownedIds[(string) $cart->getId()] = true;
$session->set(self::OWNED_ORDER_IDS_SESSION_KEY, $ownedIds);
}
return $this->inner->fetchQrCodeFromOrder($request);
}
public function createPayment(Request $request): Response
{
return $this->inner->createPayment($request);
}
public function removeQrCodeFromOrder(Request $request): JsonResponse
{
return $this->inner->removeQrCodeFromOrder($request);
}
}
Both decorators keep @.inner and only add an ownership check on orderId before handing
the request to the original action, so createPayment, removeQrCodeFromOrder and the
thank-you redirect all keep their original behaviour and the front-end contract is unchanged.
Sylius Mollie Plugin vulnerable to payment status forgery via the payment webhook
7.5
/ 10
High
Network
Low
None
None
Unchanged
None
High
None
Impact
The shop payment webhook POST /{_locale}/update-payment (route
sylius_mollie_shop_payment_webhook) accepts two independent, attacker-controlled
parameters: id (the Mollie payment ID, verified against Mollie's API) and orderId (the
Sylius order ID, read directly from the database). The handler never verifies that the
Mollie payment belongs to the referenced order.
An unauthenticated attacker who holds any valid paid Mollie payment ID, for example
from a EUR 1 order they placed themselves, can submit it together with any victim
orderId. The victim's order payment is then transitioned to completed (or any other
Mollie-derived state) without any funds being transferred for that order. Sylius order IDs
are sequential integers, and the endpoint requires no authentication, CSRF token or rate
limiting, so the attack scales trivially across all pending orders.
Patches
Fixed in versions 2.2.8, 3.2.4 and 3.3.1. The webhook now binds the payment to
the order: it reads the Mollie payment ID stored server-side for that order when the payment
was created and compares it to the incoming Mollie payment ID. On mismatch the request is
acknowledged with HTTP 200 and no state change is applied. HTTP 200 is intentional,
because Mollie retries the webhook on any non-2xx response.
The stored ID lives in one of two places depending on the checkout flow, and the fix reads
both of them (mirroring CaptureAction):
payment.getDetails()['payment_mollie_id'] for the standard Shop API and Apple Pay Direct
flows, stored in CreatePaymentAction.
order.getMolliePaymentId() for the QR-code flow, which stores the ID on the order itself
(QrCodeAction).
Reading only the payment details would reject legitimate QR-code payments, because their
payment details carry no payment_mollie_id, so both sources must be consulted.
Workarounds
If you cannot upgrade immediately, patch the vulnerability at the project level by
decorating the plugin's webhook controller. The decorator checks that the incoming Mollie
id matches the id stored for that order before handing over to the original controller,
so no plugin behaviour (state machine, logging) is lost and no extra Mollie API call is
made. Works on both 2.2 and 3.x.
Step 1. Create the decorator
Create src/Controller/Mollie/SecurePaymentWebhookController.php in your Sylius project:
<?php
declare(strict_types=1);
namespace App\Controller\Mollie;
use Sylius\Component\Core\Model\OrderInterface;
use Sylius\Component\Order\Repository\OrderRepositoryInterface;
use Sylius\MolliePlugin\Controller\Shop\PaymentWebhookController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
final class SecurePaymentWebhookController
{
public function __construct(
private readonly PaymentWebhookController $inner,
private readonly OrderRepositoryInterface $orderRepository,
) {
}
public function __invoke(Request $request): Response
{
$orderId = $request->get('orderId');
$molliePaymentId = $request->get('id');
if (null === $orderId || null === $molliePaymentId) {
return ($this->inner)($request);
}
/** @var OrderInterface|null $order */
$order = $this->orderRepository->findOneBy(['id' => $orderId]);
if (null === $order) {
return ($this->inner)($request);
}
$storedMollieId = $this->resolveStoredMollieId($order);
// Reject any webhook whose Mollie id does not match the one stored for this order.
// 200 is intentional: Mollie retries on any non-2xx response.
if (null === $storedMollieId || $storedMollieId !== (string) $molliePaymentId) {
return new JsonResponse(null, Response::HTTP_OK);
}
return ($this->inner)($request);
}
private function resolveStoredMollieId(OrderInterface $order): ?string
{
$payment = $order->getLastPayment();
$fromDetails = $payment?->getDetails()['payment_mollie_id'] ?? null;
if (null !== $fromDetails && '' !== $fromDetails) {
return (string) $fromDetails;
}
// QR-code flow stores the Mollie id on the order itself.
if (method_exists($order, 'getMolliePaymentId')) {
$fromOrder = $order->getMolliePaymentId();
if (null !== $fromOrder && '' !== $fromOrder) {
return (string) $fromOrder;
}
}
return null;
}
}
decorates: keeps the original service ID, so the route
_controller: sylius_mollie.controller.shop.payment_webhook keeps working with no route
changes. @.inner is the original plugin controller.
Sylius Mollie Plugin has unauthenticated IDOR that leaks order token and customer PII
6.5
/ 10
Medium
Network
Low
None
None
Unchanged
Low
None
Low
Impact
Two unauthenticated Mollie shop endpoints look up orders by a sequential integer orderId
with no ownership or session check. Chained, they expose customer PII.
GET /{_locale}/thank-you (PageRedirectController::thankYouAction, route
sylius_mollie_shop_thank_you_page_redirect) loads the order with findOneBy(['id' => $orderId])
and returns a 302 whose Location header carries that order's tokenValue. Any orderId
thus yields that order's token. A non-existent id dereferences null and returns a 500. The
handler also writes the raw orderId into the session.
GET /{_locale}/get-code (QrCodeAction::fetchQrCodeFromOrder, route
sylius_mollie_shop_get_qr_code) runs the same lookup and returns the order's QR code and id
as JSON, ignoring the session cart; this is where the front-end got the integer id. A bad id
500s here too.
That tokenValue is the order's only access control. Passed to the Sylius core page
GET /{_locale}/register-after-checkout/{tokenValue} it returns a form pre-filled with the
customer's first name, last name and email. The full attack: enumerate orderId, read the
token from the redirect, read the PII, at roughly a 1-in-71 hit rate for guest orders.
register-after-checkout is Sylius core, not the plugin, and trusts the token by design, so
the leak is what must be fixed.
None of the plugin endpoints require a login, session or CSRF token.
Patches
Fixed in 2.2.8, 3.2.4 and 3.3.1.
Workarounds
If you cannot upgrade immediately, patch both endpoints at the project level by decorating
the plugin controllers. The decorators enforce ownership before delegating to the original
controller, so no plugin behaviour is lost. They keep the original orderId request contract,
so no front-end or asset changes are required. Works on both 2.2 and 3.x.
Step 1. Decorate the QR code controller
Create src/Controller/Mollie/SecureQrCodeAction.php in your Sylius project:
<?php
declare(strict_types=1);
namespace App\Controller\Mollie;
use Sylius\Component\Order\Context\CartContextInterface;
use Sylius\Component\Order\Context\CartNotFoundException;
use Sylius\MolliePlugin\Controller\Shop\QrCodeAction;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
final class SecureQrCodeAction
{
private const OWNED_ORDER_IDS_SESSION_KEY = 'sylius_mollie.owned_order_ids';
public function __construct(
private readonly QrCodeAction $inner,
private readonly CartContextInterface $cartContext,
) {
}
public function fetchQrCodeFromOrder(Request $request): JsonResponse
{
$orderId = $request->get('orderId');
try {
$cart = $this->cartContext->getCart();
} catch (CartNotFoundException) {
$cart = null;
}
if (null !== $orderId && (null === $cart || (string) $cart->getId() !== (string) $orderId)) {
return new JsonResponse([], Response::HTTP_FORBIDDEN);
}
if (null !== $cart && null !== $cart->getId() && $request->hasSession()) {
$session = $request->getSession();
$ownedIds = $session->get(self::OWNED_ORDER_IDS_SESSION_KEY, []);
$ownedIds[(string) $cart->getId()] = true;
$session->set(self::OWNED_ORDER_IDS_SESSION_KEY, $ownedIds);
}
return $this->inner->fetchQrCodeFromOrder($request);
}
public function createPayment(Request $request): Response
{
return $this->inner->createPayment($request);
}
public function removeQrCodeFromOrder(Request $request): JsonResponse
{
return $this->inner->removeQrCodeFromOrder($request);
}
}
Both decorators keep @.inner and only add an ownership check on orderId before handing
the request to the original action, so createPayment, removeQrCodeFromOrder and the
thank-you redirect all keep their original behaviour and the front-end contract is unchanged.
Sylius Mollie Plugin vulnerable to payment status forgery via the payment webhook
7.5
/ 10
High
Network
Low
None
None
Unchanged
None
High
None
Impact
The shop payment webhook POST /{_locale}/update-payment (route
sylius_mollie_shop_payment_webhook) accepts two independent, attacker-controlled
parameters: id (the Mollie payment ID, verified against Mollie's API) and orderId (the
Sylius order ID, read directly from the database). The handler never verifies that the
Mollie payment belongs to the referenced order.
An unauthenticated attacker who holds any valid paid Mollie payment ID, for example
from a EUR 1 order they placed themselves, can submit it together with any victim
orderId. The victim's order payment is then transitioned to completed (or any other
Mollie-derived state) without any funds being transferred for that order. Sylius order IDs
are sequential integers, and the endpoint requires no authentication, CSRF token or rate
limiting, so the attack scales trivially across all pending orders.
Patches
Fixed in versions 2.2.8, 3.2.4 and 3.3.1. The webhook now binds the payment to
the order: it reads the Mollie payment ID stored server-side for that order when the payment
was created and compares it to the incoming Mollie payment ID. On mismatch the request is
acknowledged with HTTP 200 and no state change is applied. HTTP 200 is intentional,
because Mollie retries the webhook on any non-2xx response.
The stored ID lives in one of two places depending on the checkout flow, and the fix reads
both of them (mirroring CaptureAction):
payment.getDetails()['payment_mollie_id'] for the standard Shop API and Apple Pay Direct
flows, stored in CreatePaymentAction.
order.getMolliePaymentId() for the QR-code flow, which stores the ID on the order itself
(QrCodeAction).
Reading only the payment details would reject legitimate QR-code payments, because their
payment details carry no payment_mollie_id, so both sources must be consulted.
Workarounds
If you cannot upgrade immediately, patch the vulnerability at the project level by
decorating the plugin's webhook controller. The decorator checks that the incoming Mollie
id matches the id stored for that order before handing over to the original controller,
so no plugin behaviour (state machine, logging) is lost and no extra Mollie API call is
made. Works on both 2.2 and 3.x.
Step 1. Create the decorator
Create src/Controller/Mollie/SecurePaymentWebhookController.php in your Sylius project:
<?php
declare(strict_types=1);
namespace App\Controller\Mollie;
use Sylius\Component\Core\Model\OrderInterface;
use Sylius\Component\Order\Repository\OrderRepositoryInterface;
use Sylius\MolliePlugin\Controller\Shop\PaymentWebhookController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
final class SecurePaymentWebhookController
{
public function __construct(
private readonly PaymentWebhookController $inner,
private readonly OrderRepositoryInterface $orderRepository,
) {
}
public function __invoke(Request $request): Response
{
$orderId = $request->get('orderId');
$molliePaymentId = $request->get('id');
if (null === $orderId || null === $molliePaymentId) {
return ($this->inner)($request);
}
/** @var OrderInterface|null $order */
$order = $this->orderRepository->findOneBy(['id' => $orderId]);
if (null === $order) {
return ($this->inner)($request);
}
$storedMollieId = $this->resolveStoredMollieId($order);
// Reject any webhook whose Mollie id does not match the one stored for this order.
// 200 is intentional: Mollie retries on any non-2xx response.
if (null === $storedMollieId || $storedMollieId !== (string) $molliePaymentId) {
return new JsonResponse(null, Response::HTTP_OK);
}
return ($this->inner)($request);
}
private function resolveStoredMollieId(OrderInterface $order): ?string
{
$payment = $order->getLastPayment();
$fromDetails = $payment?->getDetails()['payment_mollie_id'] ?? null;
if (null !== $fromDetails && '' !== $fromDetails) {
return (string) $fromDetails;
}
// QR-code flow stores the Mollie id on the order itself.
if (method_exists($order, 'getMolliePaymentId')) {
$fromOrder = $order->getMolliePaymentId();
if (null !== $fromOrder && '' !== $fromOrder) {
return (string) $fromOrder;
}
}
return null;
}
}
decorates: keeps the original service ID, so the route
_controller: sylius_mollie.controller.shop.payment_webhook keeps working with no route
changes. @.inner is the original plugin controller.
Sylius Mollie Plugin has unauthenticated IDOR that leaks order token and customer PII
6.5
/ 10
Medium
Network
Low
None
None
Unchanged
Low
None
Low
Impact
Two unauthenticated Mollie shop endpoints look up orders by a sequential integer orderId
with no ownership or session check. Chained, they expose customer PII.
GET /{_locale}/thank-you (PageRedirectController::thankYouAction, route
sylius_mollie_shop_thank_you_page_redirect) loads the order with findOneBy(['id' => $orderId])
and returns a 302 whose Location header carries that order's tokenValue. Any orderId
thus yields that order's token. A non-existent id dereferences null and returns a 500. The
handler also writes the raw orderId into the session.
GET /{_locale}/get-code (QrCodeAction::fetchQrCodeFromOrder, route
sylius_mollie_shop_get_qr_code) runs the same lookup and returns the order's QR code and id
as JSON, ignoring the session cart; this is where the front-end got the integer id. A bad id
500s here too.
That tokenValue is the order's only access control. Passed to the Sylius core page
GET /{_locale}/register-after-checkout/{tokenValue} it returns a form pre-filled with the
customer's first name, last name and email. The full attack: enumerate orderId, read the
token from the redirect, read the PII, at roughly a 1-in-71 hit rate for guest orders.
register-after-checkout is Sylius core, not the plugin, and trusts the token by design, so
the leak is what must be fixed.
None of the plugin endpoints require a login, session or CSRF token.
Patches
Fixed in 2.2.8, 3.2.4 and 3.3.1.
Workarounds
If you cannot upgrade immediately, patch both endpoints at the project level by decorating
the plugin controllers. The decorators enforce ownership before delegating to the original
controller, so no plugin behaviour is lost. They keep the original orderId request contract,
so no front-end or asset changes are required. Works on both 2.2 and 3.x.
Step 1. Decorate the QR code controller
Create src/Controller/Mollie/SecureQrCodeAction.php in your Sylius project:
<?php
declare(strict_types=1);
namespace App\Controller\Mollie;
use Sylius\Component\Order\Context\CartContextInterface;
use Sylius\Component\Order\Context\CartNotFoundException;
use Sylius\MolliePlugin\Controller\Shop\QrCodeAction;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
final class SecureQrCodeAction
{
private const OWNED_ORDER_IDS_SESSION_KEY = 'sylius_mollie.owned_order_ids';
public function __construct(
private readonly QrCodeAction $inner,
private readonly CartContextInterface $cartContext,
) {
}
public function fetchQrCodeFromOrder(Request $request): JsonResponse
{
$orderId = $request->get('orderId');
try {
$cart = $this->cartContext->getCart();
} catch (CartNotFoundException) {
$cart = null;
}
if (null !== $orderId && (null === $cart || (string) $cart->getId() !== (string) $orderId)) {
return new JsonResponse([], Response::HTTP_FORBIDDEN);
}
if (null !== $cart && null !== $cart->getId() && $request->hasSession()) {
$session = $request->getSession();
$ownedIds = $session->get(self::OWNED_ORDER_IDS_SESSION_KEY, []);
$ownedIds[(string) $cart->getId()] = true;
$session->set(self::OWNED_ORDER_IDS_SESSION_KEY, $ownedIds);
}
return $this->inner->fetchQrCodeFromOrder($request);
}
public function createPayment(Request $request): Response
{
return $this->inner->createPayment($request);
}
public function removeQrCodeFromOrder(Request $request): JsonResponse
{
return $this->inner->removeQrCodeFromOrder($request);
}
}
Both decorators keep @.inner and only add an ownership check on orderId before handing
the request to the original action, so createPayment, removeQrCodeFromOrder and the
thank-you redirect all keep their original behaviour and the front-end contract is unchanged.
Sylius Mollie Plugin vulnerable to payment status forgery via the payment webhook
7.5
/ 10
High
Network
Low
None
None
Unchanged
None
High
None
Impact
The shop payment webhook POST /{_locale}/update-payment (route
sylius_mollie_shop_payment_webhook) accepts two independent, attacker-controlled
parameters: id (the Mollie payment ID, verified against Mollie's API) and orderId (the
Sylius order ID, read directly from the database). The handler never verifies that the
Mollie payment belongs to the referenced order.
An unauthenticated attacker who holds any valid paid Mollie payment ID, for example
from a EUR 1 order they placed themselves, can submit it together with any victim
orderId. The victim's order payment is then transitioned to completed (or any other
Mollie-derived state) without any funds being transferred for that order. Sylius order IDs
are sequential integers, and the endpoint requires no authentication, CSRF token or rate
limiting, so the attack scales trivially across all pending orders.
Patches
Fixed in versions 2.2.8, 3.2.4 and 3.3.1. The webhook now binds the payment to
the order: it reads the Mollie payment ID stored server-side for that order when the payment
was created and compares it to the incoming Mollie payment ID. On mismatch the request is
acknowledged with HTTP 200 and no state change is applied. HTTP 200 is intentional,
because Mollie retries the webhook on any non-2xx response.
The stored ID lives in one of two places depending on the checkout flow, and the fix reads
both of them (mirroring CaptureAction):
payment.getDetails()['payment_mollie_id'] for the standard Shop API and Apple Pay Direct
flows, stored in CreatePaymentAction.
order.getMolliePaymentId() for the QR-code flow, which stores the ID on the order itself
(QrCodeAction).
Reading only the payment details would reject legitimate QR-code payments, because their
payment details carry no payment_mollie_id, so both sources must be consulted.
Workarounds
If you cannot upgrade immediately, patch the vulnerability at the project level by
decorating the plugin's webhook controller. The decorator checks that the incoming Mollie
id matches the id stored for that order before handing over to the original controller,
so no plugin behaviour (state machine, logging) is lost and no extra Mollie API call is
made. Works on both 2.2 and 3.x.
Step 1. Create the decorator
Create src/Controller/Mollie/SecurePaymentWebhookController.php in your Sylius project:
<?php
declare(strict_types=1);
namespace App\Controller\Mollie;
use Sylius\Component\Core\Model\OrderInterface;
use Sylius\Component\Order\Repository\OrderRepositoryInterface;
use Sylius\MolliePlugin\Controller\Shop\PaymentWebhookController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
final class SecurePaymentWebhookController
{
public function __construct(
private readonly PaymentWebhookController $inner,
private readonly OrderRepositoryInterface $orderRepository,
) {
}
public function __invoke(Request $request): Response
{
$orderId = $request->get('orderId');
$molliePaymentId = $request->get('id');
if (null === $orderId || null === $molliePaymentId) {
return ($this->inner)($request);
}
/** @var OrderInterface|null $order */
$order = $this->orderRepository->findOneBy(['id' => $orderId]);
if (null === $order) {
return ($this->inner)($request);
}
$storedMollieId = $this->resolveStoredMollieId($order);
// Reject any webhook whose Mollie id does not match the one stored for this order.
// 200 is intentional: Mollie retries on any non-2xx response.
if (null === $storedMollieId || $storedMollieId !== (string) $molliePaymentId) {
return new JsonResponse(null, Response::HTTP_OK);
}
return ($this->inner)($request);
}
private function resolveStoredMollieId(OrderInterface $order): ?string
{
$payment = $order->getLastPayment();
$fromDetails = $payment?->getDetails()['payment_mollie_id'] ?? null;
if (null !== $fromDetails && '' !== $fromDetails) {
return (string) $fromDetails;
}
// QR-code flow stores the Mollie id on the order itself.
if (method_exists($order, 'getMolliePaymentId')) {
$fromOrder = $order->getMolliePaymentId();
if (null !== $fromOrder && '' !== $fromOrder) {
return (string) $fromOrder;
}
}
return null;
}
}
decorates: keeps the original service ID, so the route
_controller: sylius_mollie.controller.shop.payment_webhook keeps working with no route
changes. @.inner is the original plugin controller.
Sylius Mollie Plugin has unauthenticated IDOR that leaks order token and customer PII
6.5
/ 10
Medium
Network
Low
None
None
Unchanged
Low
None
Low
Impact
Two unauthenticated Mollie shop endpoints look up orders by a sequential integer orderId
with no ownership or session check. Chained, they expose customer PII.
GET /{_locale}/thank-you (PageRedirectController::thankYouAction, route
sylius_mollie_shop_thank_you_page_redirect) loads the order with findOneBy(['id' => $orderId])
and returns a 302 whose Location header carries that order's tokenValue. Any orderId
thus yields that order's token. A non-existent id dereferences null and returns a 500. The
handler also writes the raw orderId into the session.
GET /{_locale}/get-code (QrCodeAction::fetchQrCodeFromOrder, route
sylius_mollie_shop_get_qr_code) runs the same lookup and returns the order's QR code and id
as JSON, ignoring the session cart; this is where the front-end got the integer id. A bad id
500s here too.
That tokenValue is the order's only access control. Passed to the Sylius core page
GET /{_locale}/register-after-checkout/{tokenValue} it returns a form pre-filled with the
customer's first name, last name and email. The full attack: enumerate orderId, read the
token from the redirect, read the PII, at roughly a 1-in-71 hit rate for guest orders.
register-after-checkout is Sylius core, not the plugin, and trusts the token by design, so
the leak is what must be fixed.
None of the plugin endpoints require a login, session or CSRF token.
Patches
Fixed in 2.2.8, 3.2.4 and 3.3.1.
Workarounds
If you cannot upgrade immediately, patch both endpoints at the project level by decorating
the plugin controllers. The decorators enforce ownership before delegating to the original
controller, so no plugin behaviour is lost. They keep the original orderId request contract,
so no front-end or asset changes are required. Works on both 2.2 and 3.x.
Step 1. Decorate the QR code controller
Create src/Controller/Mollie/SecureQrCodeAction.php in your Sylius project:
<?php
declare(strict_types=1);
namespace App\Controller\Mollie;
use Sylius\Component\Order\Context\CartContextInterface;
use Sylius\Component\Order\Context\CartNotFoundException;
use Sylius\MolliePlugin\Controller\Shop\QrCodeAction;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
final class SecureQrCodeAction
{
private const OWNED_ORDER_IDS_SESSION_KEY = 'sylius_mollie.owned_order_ids';
public function __construct(
private readonly QrCodeAction $inner,
private readonly CartContextInterface $cartContext,
) {
}
public function fetchQrCodeFromOrder(Request $request): JsonResponse
{
$orderId = $request->get('orderId');
try {
$cart = $this->cartContext->getCart();
} catch (CartNotFoundException) {
$cart = null;
}
if (null !== $orderId && (null === $cart || (string) $cart->getId() !== (string) $orderId)) {
return new JsonResponse([], Response::HTTP_FORBIDDEN);
}
if (null !== $cart && null !== $cart->getId() && $request->hasSession()) {
$session = $request->getSession();
$ownedIds = $session->get(self::OWNED_ORDER_IDS_SESSION_KEY, []);
$ownedIds[(string) $cart->getId()] = true;
$session->set(self::OWNED_ORDER_IDS_SESSION_KEY, $ownedIds);
}
return $this->inner->fetchQrCodeFromOrder($request);
}
public function createPayment(Request $request): Response
{
return $this->inner->createPayment($request);
}
public function removeQrCodeFromOrder(Request $request): JsonResponse
{
return $this->inner->removeQrCodeFromOrder($request);
}
}
Both decorators keep @.inner and only add an ownership check on orderId before handing
the request to the original action, so createPayment, removeQrCodeFromOrder and the
thank-you redirect all keep their original behaviour and the front-end contract is unchanged.
Sylius Mollie Plugin vulnerable to payment status forgery via the payment webhook
7.5
/ 10
High
Network
Low
None
None
Unchanged
None
High
None
Impact
The shop payment webhook POST /{_locale}/update-payment (route
sylius_mollie_shop_payment_webhook) accepts two independent, attacker-controlled
parameters: id (the Mollie payment ID, verified against Mollie's API) and orderId (the
Sylius order ID, read directly from the database). The handler never verifies that the
Mollie payment belongs to the referenced order.
An unauthenticated attacker who holds any valid paid Mollie payment ID, for example
from a EUR 1 order they placed themselves, can submit it together with any victim
orderId. The victim's order payment is then transitioned to completed (or any other
Mollie-derived state) without any funds being transferred for that order. Sylius order IDs
are sequential integers, and the endpoint requires no authentication, CSRF token or rate
limiting, so the attack scales trivially across all pending orders.
Patches
Fixed in versions 2.2.8, 3.2.4 and 3.3.1. The webhook now binds the payment to
the order: it reads the Mollie payment ID stored server-side for that order when the payment
was created and compares it to the incoming Mollie payment ID. On mismatch the request is
acknowledged with HTTP 200 and no state change is applied. HTTP 200 is intentional,
because Mollie retries the webhook on any non-2xx response.
The stored ID lives in one of two places depending on the checkout flow, and the fix reads
both of them (mirroring CaptureAction):
payment.getDetails()['payment_mollie_id'] for the standard Shop API and Apple Pay Direct
flows, stored in CreatePaymentAction.
order.getMolliePaymentId() for the QR-code flow, which stores the ID on the order itself
(QrCodeAction).
Reading only the payment details would reject legitimate QR-code payments, because their
payment details carry no payment_mollie_id, so both sources must be consulted.
Workarounds
If you cannot upgrade immediately, patch the vulnerability at the project level by
decorating the plugin's webhook controller. The decorator checks that the incoming Mollie
id matches the id stored for that order before handing over to the original controller,
so no plugin behaviour (state machine, logging) is lost and no extra Mollie API call is
made. Works on both 2.2 and 3.x.
Step 1. Create the decorator
Create src/Controller/Mollie/SecurePaymentWebhookController.php in your Sylius project:
<?php
declare(strict_types=1);
namespace App\Controller\Mollie;
use Sylius\Component\Core\Model\OrderInterface;
use Sylius\Component\Order\Repository\OrderRepositoryInterface;
use Sylius\MolliePlugin\Controller\Shop\PaymentWebhookController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
final class SecurePaymentWebhookController
{
public function __construct(
private readonly PaymentWebhookController $inner,
private readonly OrderRepositoryInterface $orderRepository,
) {
}
public function __invoke(Request $request): Response
{
$orderId = $request->get('orderId');
$molliePaymentId = $request->get('id');
if (null === $orderId || null === $molliePaymentId) {
return ($this->inner)($request);
}
/** @var OrderInterface|null $order */
$order = $this->orderRepository->findOneBy(['id' => $orderId]);
if (null === $order) {
return ($this->inner)($request);
}
$storedMollieId = $this->resolveStoredMollieId($order);
// Reject any webhook whose Mollie id does not match the one stored for this order.
// 200 is intentional: Mollie retries on any non-2xx response.
if (null === $storedMollieId || $storedMollieId !== (string) $molliePaymentId) {
return new JsonResponse(null, Response::HTTP_OK);
}
return ($this->inner)($request);
}
private function resolveStoredMollieId(OrderInterface $order): ?string
{
$payment = $order->getLastPayment();
$fromDetails = $payment?->getDetails()['payment_mollie_id'] ?? null;
if (null !== $fromDetails && '' !== $fromDetails) {
return (string) $fromDetails;
}
// QR-code flow stores the Mollie id on the order itself.
if (method_exists($order, 'getMolliePaymentId')) {
$fromOrder = $order->getMolliePaymentId();
if (null !== $fromOrder && '' !== $fromOrder) {
return (string) $fromOrder;
}
}
return null;
}
}
decorates: keeps the original service ID, so the route
_controller: sylius_mollie.controller.shop.payment_webhook keeps working with no route
changes. @.inner is the original plugin controller.
Sylius Mollie Plugin has unauthenticated IDOR that leaks order token and customer PII
6.5
/ 10
Medium
Network
Low
None
None
Unchanged
Low
None
Low
Impact
Two unauthenticated Mollie shop endpoints look up orders by a sequential integer orderId
with no ownership or session check. Chained, they expose customer PII.
GET /{_locale}/thank-you (PageRedirectController::thankYouAction, route
sylius_mollie_shop_thank_you_page_redirect) loads the order with findOneBy(['id' => $orderId])
and returns a 302 whose Location header carries that order's tokenValue. Any orderId
thus yields that order's token. A non-existent id dereferences null and returns a 500. The
handler also writes the raw orderId into the session.
GET /{_locale}/get-code (QrCodeAction::fetchQrCodeFromOrder, route
sylius_mollie_shop_get_qr_code) runs the same lookup and returns the order's QR code and id
as JSON, ignoring the session cart; this is where the front-end got the integer id. A bad id
500s here too.
That tokenValue is the order's only access control. Passed to the Sylius core page
GET /{_locale}/register-after-checkout/{tokenValue} it returns a form pre-filled with the
customer's first name, last name and email. The full attack: enumerate orderId, read the
token from the redirect, read the PII, at roughly a 1-in-71 hit rate for guest orders.
register-after-checkout is Sylius core, not the plugin, and trusts the token by design, so
the leak is what must be fixed.
None of the plugin endpoints require a login, session or CSRF token.
Patches
Fixed in 2.2.8, 3.2.4 and 3.3.1.
Workarounds
If you cannot upgrade immediately, patch both endpoints at the project level by decorating
the plugin controllers. The decorators enforce ownership before delegating to the original
controller, so no plugin behaviour is lost. They keep the original orderId request contract,
so no front-end or asset changes are required. Works on both 2.2 and 3.x.
Step 1. Decorate the QR code controller
Create src/Controller/Mollie/SecureQrCodeAction.php in your Sylius project:
<?php
declare(strict_types=1);
namespace App\Controller\Mollie;
use Sylius\Component\Order\Context\CartContextInterface;
use Sylius\Component\Order\Context\CartNotFoundException;
use Sylius\MolliePlugin\Controller\Shop\QrCodeAction;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
final class SecureQrCodeAction
{
private const OWNED_ORDER_IDS_SESSION_KEY = 'sylius_mollie.owned_order_ids';
public function __construct(
private readonly QrCodeAction $inner,
private readonly CartContextInterface $cartContext,
) {
}
public function fetchQrCodeFromOrder(Request $request): JsonResponse
{
$orderId = $request->get('orderId');
try {
$cart = $this->cartContext->getCart();
} catch (CartNotFoundException) {
$cart = null;
}
if (null !== $orderId && (null === $cart || (string) $cart->getId() !== (string) $orderId)) {
return new JsonResponse([], Response::HTTP_FORBIDDEN);
}
if (null !== $cart && null !== $cart->getId() && $request->hasSession()) {
$session = $request->getSession();
$ownedIds = $session->get(self::OWNED_ORDER_IDS_SESSION_KEY, []);
$ownedIds[(string) $cart->getId()] = true;
$session->set(self::OWNED_ORDER_IDS_SESSION_KEY, $ownedIds);
}
return $this->inner->fetchQrCodeFromOrder($request);
}
public function createPayment(Request $request): Response
{
return $this->inner->createPayment($request);
}
public function removeQrCodeFromOrder(Request $request): JsonResponse
{
return $this->inner->removeQrCodeFromOrder($request);
}
}
Both decorators keep @.inner and only add an ownership check on orderId before handing
the request to the original action, so createPayment, removeQrCodeFromOrder and the
thank-you redirect all keep their original behaviour and the front-end contract is unchanged.
Sylius Mollie Plugin vulnerable to payment status forgery via the payment webhook
7.5
/ 10
High
Network
Low
None
None
Unchanged
None
High
None
Impact
The shop payment webhook POST /{_locale}/update-payment (route
sylius_mollie_shop_payment_webhook) accepts two independent, attacker-controlled
parameters: id (the Mollie payment ID, verified against Mollie's API) and orderId (the
Sylius order ID, read directly from the database). The handler never verifies that the
Mollie payment belongs to the referenced order.
An unauthenticated attacker who holds any valid paid Mollie payment ID, for example
from a EUR 1 order they placed themselves, can submit it together with any victim
orderId. The victim's order payment is then transitioned to completed (or any other
Mollie-derived state) without any funds being transferred for that order. Sylius order IDs
are sequential integers, and the endpoint requires no authentication, CSRF token or rate
limiting, so the attack scales trivially across all pending orders.
Patches
Fixed in versions 2.2.8, 3.2.4 and 3.3.1. The webhook now binds the payment to
the order: it reads the Mollie payment ID stored server-side for that order when the payment
was created and compares it to the incoming Mollie payment ID. On mismatch the request is
acknowledged with HTTP 200 and no state change is applied. HTTP 200 is intentional,
because Mollie retries the webhook on any non-2xx response.
The stored ID lives in one of two places depending on the checkout flow, and the fix reads
both of them (mirroring CaptureAction):
payment.getDetails()['payment_mollie_id'] for the standard Shop API and Apple Pay Direct
flows, stored in CreatePaymentAction.
order.getMolliePaymentId() for the QR-code flow, which stores the ID on the order itself
(QrCodeAction).
Reading only the payment details would reject legitimate QR-code payments, because their
payment details carry no payment_mollie_id, so both sources must be consulted.
Workarounds
If you cannot upgrade immediately, patch the vulnerability at the project level by
decorating the plugin's webhook controller. The decorator checks that the incoming Mollie
id matches the id stored for that order before handing over to the original controller,
so no plugin behaviour (state machine, logging) is lost and no extra Mollie API call is
made. Works on both 2.2 and 3.x.
Step 1. Create the decorator
Create src/Controller/Mollie/SecurePaymentWebhookController.php in your Sylius project:
<?php
declare(strict_types=1);
namespace App\Controller\Mollie;
use Sylius\Component\Core\Model\OrderInterface;
use Sylius\Component\Order\Repository\OrderRepositoryInterface;
use Sylius\MolliePlugin\Controller\Shop\PaymentWebhookController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
final class SecurePaymentWebhookController
{
public function __construct(
private readonly PaymentWebhookController $inner,
private readonly OrderRepositoryInterface $orderRepository,
) {
}
public function __invoke(Request $request): Response
{
$orderId = $request->get('orderId');
$molliePaymentId = $request->get('id');
if (null === $orderId || null === $molliePaymentId) {
return ($this->inner)($request);
}
/** @var OrderInterface|null $order */
$order = $this->orderRepository->findOneBy(['id' => $orderId]);
if (null === $order) {
return ($this->inner)($request);
}
$storedMollieId = $this->resolveStoredMollieId($order);
// Reject any webhook whose Mollie id does not match the one stored for this order.
// 200 is intentional: Mollie retries on any non-2xx response.
if (null === $storedMollieId || $storedMollieId !== (string) $molliePaymentId) {
return new JsonResponse(null, Response::HTTP_OK);
}
return ($this->inner)($request);
}
private function resolveStoredMollieId(OrderInterface $order): ?string
{
$payment = $order->getLastPayment();
$fromDetails = $payment?->getDetails()['payment_mollie_id'] ?? null;
if (null !== $fromDetails && '' !== $fromDetails) {
return (string) $fromDetails;
}
// QR-code flow stores the Mollie id on the order itself.
if (method_exists($order, 'getMolliePaymentId')) {
$fromOrder = $order->getMolliePaymentId();
if (null !== $fromOrder && '' !== $fromOrder) {
return (string) $fromOrder;
}
}
return null;
}
}
decorates: keeps the original service ID, so the route
_controller: sylius_mollie.controller.shop.payment_webhook keeps working with no route
changes. @.inner is the original plugin controller.