- To reproduce this issue, I am removing the transitive dependency for logging from SpringBoot.
- Instead, I am bringing in
spring-boot-starter-log4j2
spring-boot-starter-log4j2
brings inlog4j-core
which has the remote code exploit (RCE) vulnerability.
- Either run the command
./gradlew clean build bootRun
in a terminal OR - Right click and click
run
inLog4TestApplication.java
.
- Because we are resolving to a non-existent site, we get a
ConnectException
. - But, imagine the possibilities if this was an actual malicious server!
- IF YOU ARE USING MAVEN - https://github.com/strawhatasif/log4j-test/tree/maven-variant
- Located in the https://github.com/strawhatasif/log4j-test/tree/strategic-fix.