Public research

Paymob for WooCommerce

CVE-2026-87978
Missing payment-notification authentication

Public advisory · Public source snapshot: November 12, 2026

Original portfolio report · Source reference · Source reference · Public advisory

Shared credits and the scope of my investigation are documented below.

Mallory does not need a WordPress account or Paymob signing secret to send a forged subscription-transaction notification to an affected merchant's callback. By choosing an existing eligible WooCommerce order and supplying approval flags, she can reach the plugin's payment_complete() call without authenticating the notification. This is a payment-state authentication bypass in the merchant plugin, not a compromise of Paymob's payment infrastructure or a stolen WordPress session.

WPScan's public advisory identifies releases before 4.1.14 as affected and lists 4.1.14 as fixed. It was published September 21, 2026, and credits me as original researcher and submitter.

I reviewed official WordPress release archives for 4.0.0, 4.0.8, 4.0.9, 4.1.0, 4.1.13, and 4.1.14 without executing a payment trigger. The first five contain the unauthenticated branch; 4.1.14 adds signature verification inside that handler. Version 4.0.0 is the earliest affected release inspected here, not an established first affected release. This report was updated October 19, 2026, after the public advisory made its PoC available.

A WooCommerce merchant relies on its payment gateway to distinguish a genuine provider notification from an arbitrary internet request. Receiving a notification is not itself evidence that funds were collected: its authenticity must be established before the plugin changes payment state.

The relevant topology is WordPress with WooCommerce, an active and configured Paymob for WooCommerce gateway, and its public callback reachable at ?wc-api=paymob_callback. The constructor registers woocommerce_api_paymob_callback; callback() routes POST requests to callWebhookAction(). Mallory controls the JSON body, but must select an existing order accepted by the plugin's payment-method checks and whose state is pending, failed, or on-hold. An unknown order is not sufficient.

No disposable runtime deployment was used, and the prevalence of particular merchant configurations was not measured. Although the vulnerable branch is named for subscription transactions, its dispatch condition reads a subscription-plan value from the incoming JSON; that attacker-supplied value is not proof of a real subscription or an authenticated transaction.

A caller can choose the unsigned branch

In 4.1.13, src/paymob-for-woocommerce.php, callWebhookAction(), decodes php://input as JSON and chooses a handler. The ordinary TRANSACTION route requires a request hmac and passes the notification to acceptWebhook(), which verifies it. The subsequent branch instead tests the supplied subscription-plan field:

elseif(isset( $json_data['type'] ) && $json_data['obj']['payment_key_claims']['subscription_plan_id'] && 'TRANSACTION' === $json_data['type']){
    $this->subscriptionTransactionWebhook( $json_data, $url, $country );
}

Omitting the request HMAC avoids the preceding transaction branch. A nonempty obj.payment_key_claims.subscription_plan_id then selects the subscription-transaction handler. That handler in 4.1.13 does not invoke verifyHmac() before changing the order.

Order checks do not authenticate a payment notification

subscriptionTransactionWebhook() takes obj.order.merchant_order_id from the JSON and passes it to Paymob::getIntentionId(). In includes/helper/paymob.php, this helper simply returns substr( $merchantIntentionId, 0, -11 ): the last eleven characters are removed, leaving the order identifier. Those suffix characters are not an authentication token.

The handler retrieves the order, reads its stored Paymob payment-method metadata, and calls PaymobOrder::validateOrderInfo(). In includes/helper/paymob-order.php, that function checks the order identifier and compares payment-method values, with a special case for paymob-pixel. It does not validate a provider signature or prove that Mallory owns the order. The next check limits transitions to pending, failed, or on-hold orders. These are real constraints, but none proves that money was received.

Untrusted approval flags reach the payment sink

Back in subscriptionTransactionWebhook(), the approval condition uses the JSON booleans directly:

true ===  $obj['success'] &&
false === $obj['is_voided'] &&
false === $obj['is_refunded'] &&
false === $obj['pending'] &&
false === $obj['is_void'] &&
false === $obj['is_refund'] &&
false === $obj['error_occured']

When these values indicate approval, the handler adds transaction notes and calls:

$order->payment_complete( $orderId );

The handler later saves transaction metadata and the order. We have carried the same caller-controlled notification from dispatch through order selection to payment completion without encountering the signature verification that protects the ordinary transaction route.

The same unsigned-handler mechanism is present in the inspected 4.0.0, 4.0.8, 4.0.9, and 4.1.0 snapshots. Intermediate patch releases were not individually checked. Complete introducing-change history and a definitive first affected release were not established; the advisory's broader pre-4.1.14 range should not be mistaken for individual inspection of every release. The 4.1.13 archive and 4.1.14 archive provide the affected/fixed source comparison.

The supported primitive is an unauthorized payment-state transition for an order accepted by the handler's existing checks. Knowledge or selection of an eligible order identifier is required; the review does not establish a way to discover every store's order identifiers. A valid provider HMAC and a signed-in WordPress session are not required on the vulnerable route.

The concrete sink is WooCommerce payment completion, not a transfer of funds from Paymob. Downstream effects such as shipping goods or granting access depend on the merchant's fulfillment workflow and were not tested. This source review does not demonstrate a particular financial loss, exploitation reliability across merchant configurations, or remote code execution.

Positive controls using genuine notifications and negative controls using unauthenticated notifications were not run. They remain useful authorized regression work, not observations claimed by this report.

The public WPScan PoC contains the original unsigned POST request. It sets the JSON transaction type and subscription-plan field, supplies the target order identifier followed by eleven suffix characters, and sets the approval booleans to the values shown above. The endpoint and each material field now appear in that public disclosure; no private correspondence is needed to follow this report.

I inspected the published request against the release source but did not send it to a store or run a WooCommerce test installation. The expected vulnerable result is that an eligible order reaches payment completion and the handler returns its order-updated message; that is not a fresh observed result claimed here. The compact published request omits some informational fields read by the handler, so PHP warning behavior and merchant-specific runtime compatibility remain untested.

Any reproduction should use a disposable local store with test orders and non-production payment configuration. The trigger can change payment status and metadata; it must not be sent to a merchant's live callback. A useful local comparison would send the same unsigned notification to 4.1.13 and 4.1.14, verify unchanged payment state on the fixed release, and separately confirm that a genuine signed notification still works. Those controls were not performed for this write-up.

Upgrade to 4.1.14 or a later vendor-supported corrected release. Unlike the earlier summary, this update can verify the 4.1.14 source directly. Its subscriptionTransactionWebhook() adds this guard before retrieving or mutating the WooCommerce order:

if ( ! Paymob::verifyHmac( $this->hmac_hidden, $json_data, null, Paymob::filterVar( 'hmac', 'REQUEST' ) ) ) {
    die( esc_html( "can not verify order: $orderId" ) );
}

The helper routes transaction verification to verifyAcceptHmac(), which builds the provider transaction string, computes its SHA-512 HMAC with the configured key, and compares it with the supplied value. This closes the reviewed missing-verification path at its handler rather than trusting dispatch fields as authentication. The 4.1.14 changelog labels the release a security enhancement; source inspection here is not a runtime regression test or a broader audit of all callback variants.

Regression coverage should assert that absent, empty, and invalid HMACs leave both order status and transaction metadata unchanged, even when the body supplies a subscription-plan identifier and approved flags. It should also cover valid signed callbacks, all eligible order states, repeated notifications, and the ordinary transaction route so that authentication cannot be bypassed by selecting a different JSON branch.

This finding is about authenticating the payment notification before trusting its status fields. The inspected affected releases allow a caller-selected subscription-transaction branch to complete an eligible order without that check. The inspected 4.1.14 release adds HMAC verification before order access and mutation. The public PoC and source support the causal explanation; no live payment bypass or fixed-target runtime test is claimed.