gongfuxiang / shopxo

ShopXO企业级免费开源商城系统,可视化DIY拖拽装修、包含PC、H5、多端小程序(微信+支付宝+百度+头条&抖音+QQ+快手)、APP、多仓库、多商户、多门店、IM客服,进销存遵循MIT开源协议发布、基于ThinkPHP8框架研发
https://shopxo.net
MIT License
2.64k stars 799 forks source link

XSS vulnerability #57

Open P0wfuu opened 3 years ago

P0wfuu commented 3 years ago

After the template file of ‘index.php?s=order/index' is parsed, there is a controllable variable here. image image By using payload index.php?s=order&ids="><script>alert(1);</script> ,we can get an xss alert.But it need anyone is logining,so hacker can get user's cookies when they visit the evil link. image

gongfuxiang commented 3 years ago

'index.php?s=order/index'的模板文件解析后,这里有一个可控变量。 通过使用payload ,我们可以获得一个xss警报。但是它需要任何人登录,所以黑客可以在访问恶意链接时获取用户的cookie。 图像 图像 index.php?s=order&ids="><script>alert(1);</script> 图像

您好、非常感谢您的反馈,这个是新版本框架升级忘记开启参数验证了,前几天已在dev分支修复。

P0wfuu commented 3 years ago

Yeah,you hava fixed it. image

P0wfuu commented 3 years ago

No,No,No.This vulnerability still exists. You only use htmlspecialchars for data_request, and then url-decode $params['ids'], so we can bypass it using the second url encoding. ?s=order&ids=%2522%253E%253Cscript%253Ealert(1)%3B%253C%2Fscript%253E image

gongfuxiang commented 3 years ago

No,No,No.This vulnerability still exists. You only use htmlspecialchars for data_request, and then url-decode $params['ids'], so we can bypass it using the second url encoding. ?s=order&ids=%2522%253E%253Cscript%253Ealert(1)%3B%253C%2Fscript%253E image

您好,非常感谢您的深度测试反馈,刚才已在 dev 分支提交了新的修复方案,如有问题可以再次提交记录。