Struts 2 在 2.2.1.1 版本之前曾报出远程命令执行漏洞,如今在 Struts 2 的 2.3.1 及之前版本再报远程命令执行及服务器任意覆盖文件的漏洞。
这次报出的漏洞属于多重高危漏洞,危害性比较严重。该漏洞影响 Struts 2 中几乎所有版本(2.1.0~2.3.1)。
安全建议:
1:该漏洞已于 Struts 2 最新版本(2.3.1.1)中解决,请升级至最近的版本
2:禁止在生产环境中将 struts.devMode 设为 true
3:如果不是特别需要的话,将 struts.enable.DynamicMethodInvocation 值设为 false(默认为 true)
详情参考:
[1] 漏洞原文:
https://www.sec-consult.sg/comfiles/20120104-0_Apache_Struts2_Multiple_Critical_Vulnerabilities.txt
[2] Struts 2 第 008 号安全文档:
http://struts.apache.org/2.x/docs/s2-008.html
[3] Struts 2.2.1.1 之前的动态方法调用漏洞:
Struts 2 Security Vulnerability - Dynamic Method Invocation