黑客风云——风云网络
设为首页 加入收藏 我要投稿 网站地图
您现在的位置: 黑客风云 >> 黑客文章 >> 网管频道 >> 入侵检测 >> 文章正文
[推荐]Fckeditor<=2.4.2 For php任意上传文件漏洞
        ★★★★★
Fckeditor<=2.4.2 For php任意上传文件漏洞
文章整理发布:黑客风云 文章来源:www.05112.com 更新时间:2007-12-21
FCKeditor是一款非常优秀的HTML在线编辑器。在处理PHP上传的地方存在严重的安全漏洞导致用户可以上传任意文件

在fckeditor/editor/filemanager/upload/php/upload.php 61行

$sType = isset( $_GET['Type'] ) ? $_GET['Type'] : 'File' ;

// Check if it is an allowed type.
if ( !in_array( $sType, array('File','Image','Flash','Media') ) )
SendResults( 1, '', '', 'Invalid type specified' ) ;

// Get the allowed and denied extensions arrays.
$arAllowed = $Config['AllowedExtensions'][$sType] ;
$arDenied = $Config['DeniedExtensions'][$sType] ;

// Check if it is an allowed extension.
if ( ( count($arAllowed) > 0 && !in_array( $sExtension, $arAllowed ) )
|| ( count($arDenied) > 0 && in_array( $sExtension,
$arDenied ) ) )
SendResults( '202' ) ;

程序从$_GET数组中获取Type变量,然后通过in_array进行类型判断。
但在config配置文件中

$Config['ForceSingleExtension'] = true ;

$Config['AllowedExtensions']['File'] = array() ;
$Config['DeniedExtensions']['File'] =
array('html','htm','php','php2','php3','php4','php5','phtml','pwml','inc','asp','aspx','ascx','jsp','cfm','cfc','pl','bat','exe','com','dll','vbs','js','reg','cgi','htaccess','asis') ;

$Config['AllowedExtensions']['Image'] =
array('jpg','gif','jpeg','png') ;
$Config['DeniedExtensions']['Image'] = array() ;

$Config['AllowedExtensions']['Flash'] = array('swf','fla') ;
$Config['DeniedExtensions']['Flash'] = array() ;

并未对Media类型进行上传文件类型的控制,导致用户上传任意文件

修补办法:更新到最新的2.5版本。或者在config.php文件中,添加对Media类型的文件类型限制
文章录入:cainiaowang    责任编辑:cainiaowang 
  • 上一篇文章:

  • 下一篇文章: 没有了
  • 【字体: 】【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
    VIP 专 区
    Copyright @2006 黑客风云 ●业务联系:QQ 联系怪人 联系奇人 Email:给怪人发邮件 给奇人发邮件
    ICP备案:冀06009886