Spring Framework Zero-day RCE via Data Binding on JDK 9+

Spring Java framework zero-day allows remote code execution. A new zero-day vulnerability in the Spring Core Java framework called 'Spring4Shell' has been publicly disclosed, allowing unauthenticated remote code execution on applications.

Spring is a very popular application framework that allows software developers to quickly and easily develop Java applications with enterprise-level features. These applications can then be deployed on servers, such as Apache Tomcat, as stand-alone packages with all the required dependencies.



Yesterday, a new Spring Cloud Function vulnerability tracked as CVE-2022-22963 was disclosed, with Proof-of-Concept exploits soon to follow.

However, information about a more critical Spring Core remote code execution vulnerability was later circulating on the QQ chat service and a Chinese cybersecurity site.

Today, an exploit for this zero-day vulnerability was briefly leaked and then removed but not before cybersecurity researchers could download the code.

Since then, numerous cybersecurity researchers and security firms have confirmed that the vulnerability is valid and of significant concern.

A Spring MVC or Spring WebFlux application running on JDK 9+ may be vulnerable to remote code execution (RCE) via data binding. The specific exploit requires the application to run on Tomcat as a WAR deployment. If the application is deployed as a Spring Boot executable jar, i.e. the default, it is not vulnerable to the exploit. However, the nature of the vulnerability is more general, and there may be other ways to exploit it.

These are the prerequisites for the exploit:

- JDK 9 or higher

- Apache Tomcat as the Servlet container

- Packaged as WAR

- spring-webmvc or spring-webflux dependency

Affected VMware Products and Versions

Severity is critical unless otherwise noted.

- Spring Framework

- 5.3.0 to 5.3.17

- 5.2.0 to 5.2.19

- Older, unsupported versions are also affected

Mitigation

Users of affected versions should apply the following mitigation: 5.3.x users should upgrade to 5.3.18+, 5.2.x users should upgrade to 5.2.20+. No other steps are necessary. There are other mitigation steps for applications that cannot upgrade to the above versions. Those are described in the early announcement blog post, listed under the Resources section. Releases that have fixed this issue include:

  • Spring Framework
    - 5.3.18+
    - 5.2.20+

For those project which don't using spring-webmvc or spring-webflux dependency.

And using java 8 no worry.

Credit

This vulnerability was responsibly reported to VMware by codeplutos, meizjm3i of AntGroup FG Security Lab. A secondary report was also received from Praetorian.

Source:

https://spring.io/blog/2022/03/31/spring-framework-rce-early-announcement

Previous Post Next Post