Struts2高位漏洞升级到struts2.3.32

                  

Struts2高位漏洞升级到struts2.3.32 

3月7日带来了一个高危漏洞Struts2漏洞——CVE编号CVE-2017-5638。其原因是由于Apache Struts2的Jakarta Multipart parser插件存在远程代码执行漏洞,攻击者可以在使用该插件上传文件时,修改HTTP请求头中的Content-Type值来触发该漏洞,导致远程执行代码。

  • 升级jar包 
    更新这些jar包:freemarker-2.3.22.jar,ognl-3.0.19.jar,struts2-core-2.3.32.jar,xwork-core-2.3.32.jar,struts2-json-plugin-2.3.32.jar,如果是与spring整合的项目,另加struts2-spring-plugin-2.3.32.jar
  • struts.xml修改
<constant name="struts.enable.DynamicMethodInvocation" value="true"/>
<constant name="struts.convention.action.mapallmatches" value="true"/>

  

struts.xml修改原因:struts2.3.16.3升级遇到无法动态访问action的方法的问题。

需要的jar包/检测的工具

链接:http://pan.baidu.com/s/1pKO02Av 密码:mo2k

转载自:http://blog.csdn.net/et54h/article/details/69568471

原文地址:https://www.cnblogs.com/collin/p/7727887.html