漏洞概要
漏洞编号:CVE-2017-12611、S2-053
漏洞概述:当开发人员在Freemarker标签中使用错误的构造时,可能会导致远程代码执行漏洞。
漏洞作者:Lupin@京东安全团队、David Greene、Roland McIntosh
影响范围:Struts 2.0.1 - Struts 2.3.33、Struts 2.5 - Struts 2.5.10
漏洞等级:中危
相关链接如下:
https://cwiki.apache.org/confluence/display/WW/S2-053
漏洞描述
当在Freemarker标签中使用表达式常量或强制表达式时使用请求值可能会导致远程代码执行漏洞(见下面的示例)
<@s.hidden name="redirectUri" value=redirectUri /><@s.hidden name="redirectUri" value="${redirectUri}" />
在这两种情况下,值属性都使用可写属性,都会受到Freemarker的表达式的影响。
修复建议
用户应避免在Freemarker的结构代码中使用可写的属性,或者使用只读属性来初始化value属性(仅限getter属性)。请受影响的用户立即升级到不受影响的版本来防护该漏洞。
参考链接:
Struts 2.5.12:
https://cwiki.apache.org/confluence/display/WW/Version+Notes+2.5.12
Struts 2.3.34:
https://cwiki.apache.org/confluence/display/WW/Version+Notes+2.3.34
官方表示,虽然新版本限制了Freemarker的配置属性,但是用户还是应该避免使用有问题的结构属性。
由于2.5.12版本仍然受到近日的S2-052漏洞影响 , 建议用户直接升级到最新的2.5.13版本。
https://cwiki.apache.org/confluence/display/WW/Version+Notes+2.5.13
综合整理至安全客: http://bobao.360.cn/news/detail/4295.html 安全加: http://toutiao.secjia.com/struts2-cve-2017-12611-s2-053
特别声明:以上内容(如有图片或视频亦包括在内)为自媒体平台“网易号”用户上传并发布,本平台仅提供信息存储服务。
Notice: The content above (including the pictures and videos if any) is uploaded and posted by a user of NetEase Hao, which is a social media platform and only provides information storage services.