某变量未初始化导致服务器设置register_global=On时会员可以随意修改自己的member信息。
; H, @8 N; ~' j# }. K% B9 k$ L
' f' `: D3 B/ P* ?; F由于需要register_global=On支持,影响有限。。漏洞涉及到会员可以修改自己的余额导致网站可能产生严重后果因此漏洞等级设为高。
* J* ? j( L* v( g! C8 R* J- x* |1 M详细说明:修改用户密码的account_manage_password函数未对$updateinfo初始化,导致可以提交
- ^2 B4 s3 f8 W5 M$ F/ _' gupdateinfo[amount]这样的数组随意修改自己的余额、点数、会员组、VIP等一切存放在member表的信息
& g$ K" c+ t1 t' x$ ~文件: \phpcms\modules\member\index.php
/ o; q6 t: B. `) l% p% L% k3 [0 V( ]. ]5 V" e, l- n! M9 w0 F" E
约435行:
$ h1 q/ T; w, [, s" G6 H2 n: W8 c$newpassword = password($_POST['info']['newpassword'], $this->memberinfo['encrypt']);
& y3 B# x/ p0 L7 e- M0 _8 l$updateinfo['password'] = $newpassword;
3 F7 ~% c5 a9 H% ]! O$this->db->update($updateinfo, array('userid'=>$this->memberinfo['userid']));
& Z% f, o: Z. N8 }$ g V' n9 L漏洞证明:文件: \phpcms\modules\member\index.php2 J8 _2 N- H9 I2 s k2 k5 K0 y
6 f6 c' i; d7 h$ {1 x3 h3 P' J约435行:: c) J' h" D. t, [ }8 N. K0 }
$newpassword = password($_POST['info']['newpassword'], $this->memberinfo['encrypt']);( S! d8 p. x# s
$updateinfo['password'] = $newpassword;+ k; ]- N, \ Y' |+ H* O: q0 K; }
$this->db->update($updateinfo, array('userid'=>$this->memberinfo['userid']));
" J$ l2 \( x) R7 [7 b9 k" ^' q A" b* `+ R& Y" m0 i
修复方案:
4 R S- x+ G8 ?& L+ @( }
4 x8 i; |- _2 O1 V5 K$updateinfo = array();
* ~5 {8 B# u7 @* t1 c( r! d+ H3 ]9 s. q
|