继续梳理shiro历史漏洞
目录
su18后面没再更新了,所以我们继续写。
CVE-2020-17510
漏洞信息
漏洞信息 | 详情 |
---|---|
漏洞编号 | CVE-2020-17510 |
影响版本 | shiro < 1.7.0 |
漏洞描述 | Apache Shiro 由于处理身份验证请求时存在权限绕过漏洞,远程攻击者可以发送特制的HTTP请求,绕过身份验证过程并获得对应用程序的未授权访问。 |
漏洞关键字 | Spring | 顺序 | %2e | 绕过 |
漏洞补丁 | Commit-16fc47a |
相关链接 | https://security.snyk.io/vuln/SNYK-JAVA-ORGAPACHESHIRO-1050098 |
漏洞分析
条件
- springboot version >= 2.3.1.RELEASE
访问/hello/%2e
绕过限制 shiro的流程:解码->/hello/.
->路径标准化->/hello/
绕过限制 sprinboot会使用全路径,/hello/%2e
可以匹配到/hello/{name}
/%2e
/%2e/
/%2e%2e
/%2e%2e/
下面的呢?
/.
/./
/..
/../
当升级版本为1.7.0的时候需如果没使用shiro-spring-boot-web-starter
要额外配置[ShiroRequestMappingConfig](https://shiro.apache.org/spring-framework.html#web_applications)
如果没配置,仍然有绕过的问题。
@Configuration
@Import({ShiroRequestMappingConfig.class})
public class ApplicationConfig {
}