DotClear prepend.php 远程文件包含漏洞

漏洞信息详情

DotClear prepend.php 远程文件包含漏洞

漏洞简介

dotClear是一个的基于PHP和MySQL的Blog系统。

dotClear的实现上存在输入验证漏洞,远程攻击者可能利用此漏洞在服务器上以Web进程权限执行任意命令。

在dotClear的layout/prepend.php文件78-104行:

# Variable de conf

$theme_path = $blog_dc_path.\’\’/themes/\’\’;

$theme_uri = dc_app_url.\’\’/themes/\’\’;

$img_path = dc_img_url;

# D?finition du th?me et de la langue

$__theme = dc_theme;

$__lang = dc_default_lang;

# Ajout des functions.php des plugins

$objPlugins = new plugins(dirname(__FILE__).\’\’/../\’\’.DC_ECRIRE.\’\’/tools/\’\’);

foreach ($objPlugins->getFunctions() as $pfunc) {

require_once $pfunc;

}

# D?finition du template

if (!is_dir($theme_path.$__theme)) {

header(\’\’Content-type: text/plain\’\’);

echo \’\’Le th?me \’\’.$__theme.\’\’ n\\’\’existe pas\’\’;

exit;

}

if (file_exists($theme_path.$__theme.\’\’/template.php\’\’)) {

$dc_template_file = $theme_path.$__theme.\’\’/template.php\’\’;

} else {

$dc_template_file = $theme_path.\’\’default/template.php\’\’;

}

echo $dc_template_file;

# Prepend du template s\’\’il existe

if (file_exists(dirname($dc_template_file).\’\’/prepend.php\’\’)) {

require dirname($dc_template_file).\’\’/prepend.php\’\’;

}

没有正确的过滤$blog_dc_path变量。在PHP5中,由于is_dir()和file_exists()函数支持ftp wrapper,因此攻击者可以从远程资源在themes/default/文件夹中包含任意prepend.php文件并执行PHP代码。

漏洞公告

目前厂商已经发布了升级补丁以修复这个安全问题,补丁下载链接:

http://www.dotclear.net/

参考网址

来源: BID

名称: 18259

链接:http://www.securityfocus.com/bid/18259

来源: BUGTRAQ

名称: 20060603 DotClear <= 1.2.4 ‘blog_dc_path’ (php5) arbitrary remote inclusion

链接:http://www.securityfocus.com/archive/1/archive/1/435873/100/0/threaded

来源: VUPEN

名称: ADV-2006-2137

链接:http://www.frsirt.com/english/advisories/2006/2137

来源: SECUNIA

名称: 20437

链接:http://secunia.com/advisories/20437

来源: MISC

链接:http://retrogod.altervista.org/dotclear_124_php5_xpl.html

来源: XF

名称: dotclear-blogdcpath-file-include(26917)

链接:http://xforce.iss.net/xforce/xfdb/26917

来源: SREASON

名称: 1053

链接:http://securityreason.com/securityalert/1053

© 版权声明
THE END
喜欢就支持一下吧
点赞0 分享