复现
项目地址:https://github.com/cristianeph/vulnerability-actuator-log-viewer
下载后使用IDEA打开工程,该漏洞是由spring-boot-actuator-logview 0.2.13之前的版本导致的。
运行项目,打开网址
poc如下:
http://localhost:8887/manage/log/view?filename=/etc/group&base=../../../../../../../../../../../../
验证如下:
通过报错可以知道漏洞代码出发位置eu.hinsch.spring.boot.actuator.logview.LogViewEndpoint#view:
进入函数,漏洞触发主要原因是:view函数对filename参数进