Visit the Wiz Whimzical Shop at AWS re:Invent
Vulnerability DatabaseGHSA-qjgm-48mm-xm5q

GHSA-qjgm-48mm-xm5q: 
PHP vulnerability analysis and mitigation

Summary

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.

Details

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.

Proof of concept

  1. Install the plugin (10.2.5) on a Magento store where order entity IDs and increment IDs are different (for example, entity ID 15 and increment ID 000000015 in a store with more than one store view, or any store with deleted orders).
  2. Set "Status mapping - BitPay invoice / Magento order on BitPay Refunds" to True.
  3. Place an order with BitPay in the test environment and pay the invoice, so the order is paid.
  4. Send this request with no x-signature header, using the real values of that order and invoice: POST /rest/V1/bitpay-bpcheckout/ipn Content-Type: application/json { "event": { "name": "invoice_refundComplete" }, "data": { "id": "<BitPay invoice ID>", "orderId": "<Magento order increment ID>", "amountPaid": <amount paid on the invoice>, "buyerFields": { "buyerName": "<buyer name on the invoice>", "buyerEmail": "<buyer email on the invoice>", "buyerAddress1": "<buyer address 1 on the invoice>", "buyerAddress2": "<buyer address 2 on the invoice>" } } }
  5. The order now has a "refunded" comment and its state is Closed, although no refund was made in BitPay.

Impact

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

Related PHP vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

GHSA-77gj-jmpx-g9fqHIGH8.1
  • PHP logoPHP
  • erugooss/erugo
NoYesNov 30, 2026
GHSA-679q-wc28-7wrvMEDIUM6.3
  • PHP logoPHP
  • knplabs/knp-snappy
NoYesNov 30, 2026
GHSA-qjgm-48mm-xm5qMEDIUM4.8
  • PHP logoPHP
  • bitpay/module-bpcheckout
NoYesNov 30, 2026
GHSA-v2m3-jwg5-vv65HIGHN/A
  • PHP logoPHP
  • tina4stack/tina4php
NoYesNov 30, 2026
GHSA-h2mr-m3v3-cq8cLOWN/A
  • JavaScript logoJavaScript
  • tina4-python
NoYesNov 30, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Additional Wiz resources

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management