caiweiming / DolphinPHP

海豚PHP——基于ThinkPHP5.1.42LTS的快速开发框架
http://www.dolphinphp.com
Other
359 stars 134 forks source link

DolphinPHP v1.5.1 has a vulnerability, Stored Cross Site Scripting(XSS) #41

Closed zhangzhijie98 closed 4 months ago

zhangzhijie98 commented 2 years ago

version:1.5.1 Vulnerability location:Background - > System - > system function - > configuration management. image image Add a new configuration,and insert payload in the configuration title payload: t"> image Save and refresh the page. Pop up window. image payload: <img src=x onerror=alert("xss")> image image When you visit this page, a pop-up window will pop up.

pengge commented 1 year ago

请考虑使用全局过滤,防止攻击,更改后需要检测业务是否存在影响。或者使用相关WAF拦截 ​application\config.php

'default_filter' => 'htmlspecialchars,addslashes,strip_tags',