Descrizione
The ZarinPal Payment Gateway for WooCommerce plugin for WordPress is vulnerable to Insecure Direct Object Reference in versions up to, and including, 5.1.1 via the `Return_from_ZarinPal_Gateway()` handler registered on the `woocommerce_api_wc_zpal` (`?wc-api=wc_zpal`) endpoint. The handler accepts a `wc_order` parameter from the query string, loads the corresponding WooCommerce order without any authentication, nonce, session, capability, or ownership check, and — when the order is paid — issues a 302 redirect to `get_return_url($order)`, whose `Location` header embeds the order's secret `order_key`. This makes it possible for unauthenticated attackers to harvest order keys for arbitrary orders (regardless of payment method) and then use those keys against the WooCommerce order-received, order-pay and download endpoints to read the associated customer's PII, including billing name, street address, phone number, email, purchased items, and totals.
Come correggere
Priorità: Media — correggere nel prossimo ciclo di patch. Motivazione: CVSS 7.5, EPSS 0.6% (percentile 43).
Versioni da aggiornare
- zarinpal افزونه پرداخت امن زرینپال برای ووکامرس (ZarinPal for WooCommerce): vulnerabili le versioni fino alla
5.1.1inclusa → aggiornare a una release successiva alla5.1.1.
Mitigazioni temporanee
Da applicare solo se non è possibile aggiornare subito:
- Restringere l'accesso al componente, applicare il principio del minimo privilegio e controllare i log per operazioni non autorizzate.
Verifica
- Individuare tutti gli asset con il prodotto interessato (inventario, scanner di vulnerabilità, CMDB).
- Confrontare la versione installata con quelle indicate sopra.
- Applicare l'aggiornamento in un ambiente di test, poi in produzione; riavviare i servizi se richiesto.
- Ripetere la scansione per confermare la correzione.
Configurazioni interessate
| Vendor | Prodotto | Versioni vulnerabili | Corretta in |
|---|---|---|---|
| zarinpal | افزونه پرداخت امن زرینپال برای ووکامرس (ZarinPal for WooCommerce) | ≤ 5.1.1 | — |
Riferimenti
- Riferimentohttps://plugins.trac.wordpress.org/browser/zarinpal-woocommerce-payment-gateway/tags/5.1.1/class-wc-gateway-zarinpal.php#L391
- Riferimentohttps://plugins.trac.wordpress.org/browser/zarinpal-woocommerce-payment-gateway/tags/5.1.1/class-wc-gateway-zarinpal.php#L400
- Riferimentohttps://plugins.trac.wordpress.org/browser/zarinpal-woocommerce-payment-gateway/tags/5.1.1/class-wc-gateway-zarinpal.php#L93
- Riferimentohttps://plugins.trac.wordpress.org/changeset?reponame=&old=3790807%40zarinpal-woocommerce-payment-gateway&new=3790807%40zarinpal-woocommerce-payment-gateway
- Riferimentohttps://www.wordfence.com/threat-intel/vulnerabilities/id/d0f61c11-a437-4f51-8462-39a17f8bf3a8?source=cve