Discuz memcache+ssrf GETSHELL漏洞的解决方法

漏洞描述:Discuz存在SSRF漏洞,在配置了memcache的情况下,攻击者可以利用ssrf通过memcache中转,向磁盘上写入WEBSHELL恶意代码,从而造成数据库泄漏

解决方法一:
打开/source/function/function_core.php
搜索

$content = preg_replace($_G['setting']['output']['preg']['search'], $_G['setting']['output']['preg']['replace'], $content);

在上面加入(看清楚一定是上面)

if (preg_match("(/|#|\+|%).*(/|#|\+|%)e", $_G['setting']['output']['preg']['search']) !== FALSE) { die("request error"); }

解决方法二:??停止使用或卸载memcache

评论

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注