ThinkSAAS 2.2-beta 存储型XSS

- AV AC AU C I A
发布: 2025-04-13
修订: 2025-04-13

### 简要描述: 富文本过滤不严格导致可植入恶意脚本盗取用户cookies ### 详细说明: 对比了一下 [WooYun: Thinksaas存储型XSS](http://www.wooyun.org/bugs/wooyun-2014-051206) ,发现确实更新了。我就无耻的来了。 下面是对富文本过滤的代码片段: ``` function cleanJs($text) { $text = trim ( $text ); //$text = stripslashes ( $text ); // 完全过滤注释 $text = preg_replace ( '/<!--?.*-->/', '', $text ); // å®Œå…¨è¿‡æ»¤åŠ¨æ€ä»£ç  $text = preg_replace ( '/<\?|\?>/', '', $text ); // 完全过滤js $text = preg_replace ( '/<script?.*\/script>/', '', $text ); // 过滤多余html $text = preg_replace ( '/<\/?(html|head|meta|link|base|body|title|style|script|form|iframe|frame|frameset|math|maction|marquee)[^><]*>/i', '', $text ); // 过滤on事件lang js while ( preg_match ( '/(<[^><]+)(data|onfinish|onmouse|onexit|onerror|onclick|onkey|onload|onchange|onfocus|onblur|onscroll)[^><]+/i', $text, $mat ) ) { $text = str_replace ( $mat [0], $mat [1], $text ); } while ( preg_match ( '/(<[^><]+)(window\.|javascript:|js:|about:|file:|document\.|vbs:|cookie)([^><]*)/i', $text,...

0%
暂无可用Exp或PoC
当前有0条受影响产品信息