精彩文章免费看

关于Struts2远程命令执行漏洞的修复建议

Struts2 2.5.1-2.5.16 均受远程命令执行漏洞影响,官方建议是升级到2.5.17可修复该漏洞。

但查看官网版本日志,2.5.17是18年8月用于紧急修复远程命令执行漏洞的,由于修复时间比较仓促,

之后短时间内连续发布 18年9月(2.5.18) 和 19年1月(2.5.20) 两个快速迭代版本也修复了不少Bug,如下:

2.5.18 Fix Bug

  • [ WW-4941 ] - [jar_cache] Some jar_cache******.tmp files are generated into a temporary directory(/tmp) during web service start
  • [ WW-4948 ] - Struts 2.5.16 is creating jar_cache files in temp folder
  • [ WW-4951 ] - MD5 and SHA1 should no longer be provided on download pages
  • [ WW-4954 ] - xml-validation fails since struts 2.5.17
  • 2.5.20 Fix Bug

  • [ WW-4971 ] - s:include tag fails with truncated content in certain circumstances
  • [ WW-4974 ] - NullPointerException in DefaultStaticContentLoader#findStaticResource
  • [ WW-4977 ] - Fixing flaky test in Jsr168DispatcherTest and Jsr286DispatcherTest
  • [ WW-4984 ] - Static files like css and js files in struts-core not properly served
  • [ WW-4986 ] - Race condition reloading config results in actions not found
  • [ WW-4987 ] - Setting Struts2 <s:select> options Css Class
  • 目前官网最新的版本就是19年1月发布的 2.5.20 版本,半年内国家漏洞库和知道创宇漏洞库均未发现该版本的漏洞,

    经过半年时间的考验,该版本是目前比较稳定和安全的, 推荐升级到 2.5.20 ,若需要使用低版本,则不得低于2.5.17

    以上为Struts2远程命令执行漏洞的修复建议。