0x00 漏洞简介
https://www.openwall.com/lists/oss-security/2020/03/23/2
0x01 漏洞分析
翻查官方commit,在commit https://github.com/apache/shiro/commit/9762f97926ba99ac0d958e088cae3be8b657948d 中找到相关信息
大致理解为Spring web在匹配url的时候会容错后面多余的/,而shiro匹配不上导致绕过,由国人tomsun28提交pull request
0x02 漏洞环境搭建
同时在LoginController中配置以下代码,用于返回一个需要认证的信息
1 @GetMapping("/test/secret") 2 public String secret(){ 3 return "secret"; 4 }
直接访问/test/secret,跳转到登录页面
访问/test/secret/,返回了secret
这样就不存在这个问题了
本人技术水平有限,如有不妥之处还望谅解
【CVE-2020-1957】shiro搭配spring时身份验证绕过漏洞分析
原文:https://www.cnblogs.com/r00tuser/p/12575934.html