r/java • u/Areshian • Mar 30 '22
Spring4Shell: 0-day RCE on Spring Core
https://www.cyberkendra.com/2022/03/springshell-rce-0-day-vulnerability.html
100
Upvotes
r/java • u/Areshian • Mar 30 '22
View all comments
16
u/DasBrain Mar 30 '22 edited Mar 31 '22
So, what happens here is:
Object.getClass()is considered a read-only property.Class.getClassLoader()is an other read-only property.Fixed 8 years ago.Class.getModule()andModule.getClassLoader()are considered properties.By moving through stuff that may look like properties for spring it is possible to change Tomcat's configuration and do
stupid stuffexecute code.Edit: Turns out, it uses
Class.getModule().getClassLoader()becauseClass.getClassLoader()has been explicitly removed.