
Cloud Vulnerability DB
A community-led vulnerabilities database
The IPN endpoint skips the webhook signature check for most orders, because it looks up the signing key with the wrong order ID. An attacker who knows real order and invoice data can send an unsigned invoice_refundComplete event. The plugin then marks a paid order as refunded, and closes it if refund status mapping is set to True. No money is moved.
The IPN route POST /rest/V1/bitpay-bpcheckout/ipn is anonymous (etc/webapi.xml). It relies on the webhook HMAC signature to trust the request. At checkout, Model/BPRedirect.php (line 158) saves the BitPay token in the bitpay_invoice table with $order->getId(), which is the order entity ID. The order_id column is a foreign key to sales_order.entity_id (etc/db_schema.xml). In Model/IpnManagement.php::postIpn() (line 250), the plugin looks up that row with $data['orderId'] from the webhook, which is the order increment ID. In most stores the two values are different, so getByOrderId() returns null. The check on line 251 only verifies the signature when a token is found, so the request continues without any signature check. Most events are then checked against the invoice status fetched from BitPay. invoice_refundComplete is not (line 310). Model/Invoice.php::refundComplete() adds a "refunded" comment to the order and, if bitpay_refund_mapping is "closed", sets the order state to closed (line 227). The only remaining check is Model/Ipn/Validator.php, which compares the buyer name, email, address and amount paid in the webhook with the invoice fetched from BitPay. An attacker needs to know these values. The HMAC check was added in 10.0.0. Versions before 10.0.0 do not verify the signature at all.
Any Magento store that uses the BitPay plugin up to 10.2.5. An unauthenticated attacker who knows a valid order and invoice pair, plus the buyer details and amount paid, can add a false "refunded" comment to a paid order. If refund status mapping is set to True, the order is also closed, which can stop the merchant from shipping a paid order. No funds are moved and no real refund is made. Workaround: set "Status mapping - BitPay invoice / Magento order on BitPay Refunds" to False. A forged event can then only add an order comment. Updating to 10.2.6 is the full fix.
Source: NVD
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."