阿⾥云MyBatis远程代码执⾏漏洞(CVE-2020-26945)修复阿⾥云 MyBatis 远程代码执⾏漏洞(CVE-2020-26945)修复
1、漏洞详情
波及 mybatis.jar版本 ⼩于<3.5.6
2、漏洞利⽤前提条件
在满⾜以下三个条件的时候,攻击者可以触发远程代码执⾏:
1、⽤户启⽤了内置的⼆级缓存
2、⽤户未设置JEP-290过滤器
3、攻击者到了⼀种修改私有Map字段条⽬的⽅法,
即修改org.apache.ibatis.cache.impl.PerpetualCache.cache有效的缓存密钥
3、关于JEP-290过滤器
关于jdk是否启⽤JEP-290过滤器:
部分摘录:
The feature is available in JDK 9 early access builds but since we wanted users of current versions to have this capability it has already been back ported to the JDK and JRE updates released with the Jan 2017 Critical Patch Update (8u121, 7u131, and 6u141).  See the release notes for the corresponding releases for further information.
意思:
jdk7从7u131开始已经内置JEP-290过滤器
jdk8从8u121开始已经内置JEP-290过滤器
cve漏洞库
jdk9 是jdk9开始的新特性,所以jdk9及之后都内置了该特性
4、是否修复
java -version > Java version "1.8.0_201"    版本⼤于8u121 ⽆需修复,忽略漏洞
5、快速修复漏洞提⽰
升级mybatis到3.5.6及以上,解决漏洞提⽰。