当前位置:WooYun >> 漏洞信息

漏洞概要 关注数(24) 关注此漏洞

缺陷编号:wooyun-2013-021364

漏洞标题:cutecms_v3.5 SQL Injection Vulnerability

相关厂商:cutecms

漏洞作者: knife

提交时间:2013-04-08 10:43

修复时间:2013-05-23 10:43

公开时间:2013-05-23 10:43

漏洞类型:SQL注射漏洞

危害等级:高

自评Rank:15

漏洞状态:未联系到厂商或者厂商积极忽略

漏洞来源: http://www.wooyun.org,如有疑问或需要帮助请联系 [email protected]

Tags标签:

4人收藏 收藏
分享漏洞:


漏洞详情

披露状态:

2013-04-08: 积极联系厂商并且等待厂商认领中,细节不对外公开
2013-05-23: 厂商已经主动忽略漏洞,细节向公众公开

简要描述:

算高危了

详细说明:

/*******************************************************/
/* cutecms_v3.5 SQL Injection Vulnerability
/* ========================
/* By: : Kn1f3
/* E-Mail : [email protected]
/*******************************************************/
/* Welcome to http://www.90sec.com */
/*******************************************************/
首先看首页文件
index.php

>>>>/**/无关代码省略/**/
define('IN_CUTECMS', true);
if(!file_exists("include/install.lock")) {
header("location:install/");exit;
}
require_once('include/helper.php');
require_once('include/generate_static.inc.php'); //包含文件
>>>>/**/无关代码省略/**/
if($staticUrl && $staticUrl!='index') {
if(preg_match("/^(.*)_page([0-9]{1,})$/i", $staticUrl)) {
$url = substr($staticUrl, 0, strpos($staticUrl, "_page")).".html";
$staticUrlRow = getStaticUrlRow($db, $url);
$action = $staticUrlRow['action'];
$urlChannelId = $urlContentId = $staticUrlRow['rid'];
$urlPageNum = substr($staticUrl, strpos($staticUrl, "_page")+5);
}

else {
$url = $staticUrl.".html";
$staticUrlRow = getStaticUrlRow($db, $url); //发现带入了数据库查询,看看getStaticUrlRow函数
if(!$staticUrlRow) {
$pathPartsArr = pathinfo($url);

$staticPathArr = explode("/", $pathPartsArr['dirname']);
$staticChannelHtmlName = array_pop($staticPathArr);
>>>>/**/无关代码省略/**/
//跟入helper.php
require_once( BASE."lang.inc.php" );
require_once( BASE."base.inc.php" );
require_once( BASE."validate.inc.php" );
require_once( BASE."elements.inc.php" );
require_once( BASE."template.inc.php" );
//继续跟入base.inc.php
function getStaticUrlRow( $db, $url = "", $rid = "" )
{
$sql = "SELECT * FROM ".PREFIX."static_url WHERE 1";
if ( $url ) //带入查询没有任何过滤
{
$sql .= " AND url = '".$url."'";
}
if ( $rid )
{
$sql .= " AND rid = ".$rid;
}
$sql .= " LIMIT 1";
$re = $db->getRow( $sql );
return $re;
}
//以为把文件加密了,就能把漏洞给修补?作者太2了吧

>>>>/**/无关代码省略/**/
http://127.0.0.1/cutecms_free_v3.5/index.php?staticUrl=[sql]

漏洞证明:

1304010332f93905ca9a2784bd.jpg

修复方案:

:) 可以用80sec那段防注入代码

版权声明:转载请注明来源 knife@乌云


漏洞回应

厂商回应:

未能联系到厂商或者厂商积极拒绝

漏洞Rank:10 (WooYun评价)