fckeditor php 漏洞,Fckeditor <=2.4.2 For php 任意上传文件漏洞--樱木花盗's BLOG...

昨天半夜还帮DingKing搞定了几个FCKeditor,今天就看到坏狼那儿贴的有这文章。。。我提示一点: FCKeditor 的 asp aspx php 版本都存在此漏洞。。。

Infos: Fckeditor <=2.4.2 For php 任意上传文件漏洞

Author: Maple-x

Date: 18/12/2007

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类型的文件类型限制

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值