漏洞名称:select_soft_post.php任意文件上传漏洞

危险等级:★★★★★(高危)

漏洞文件:/include/dialog/select_soft_post.php

披露时间:2019-05-16

漏洞描述:dedecms变量覆盖漏洞导致任意文件上传。

修复方法:
打开select_soft_post.php
找到第125行的代码(有些文件不一样建议搜索代码):

$fullfilename = $cfg_basedir.$activepath.'/'.$filename;

在这句上面添加过滤代码:

if (preg_match('#.(php|pl|cgi|asp|aspx|jsp|php5|php4|php3|shtm|shtml)[^a-zA-Z0-9]+$#i', trim($filename))) { ShowMsg("你指定的文件名被系统禁止!",'javascript:;'); exit(); }

此文件漏洞修复如图所示:
TIM截图20200418171528.png

最后修改:2020 年 04 月 18 日
如果觉得我的文章对你有用,请随意赞赏