SpringShell (Spring4Shell) : New Unpatched RCE Vulnerability in Spring Core Framework

Description

UPDATE March 31st, 2022: The Appendix section has been updated with a link to Outbreak Alert.


FortiGuard Labs is aware that an alleged Proof-of-Concept (POC) code for a new Remote Code Execution (RCE) vulnerability in Spring Core, part of the popular web open-source framework for Java called "Spring," was made available to the public (the POC was later removed). Dubbed SpringShell (Spring4Shell), CVE-2022-22965 has been assigned to the vulnerability and an emergency fix was released on March 31st, 2022. For further details regarding FortiGuard protections and a summary of coverage across all products, please refer to the Spring4Shell Vulnerability Outbreak Alert.


Why is this Significant?

This is significant because Spring Core is part of Spring Framework, one of the most popular JAVA frameworks used in the field and is very popular for enterprise applications. As such, wide exploitation of the vulnerability can impact users globally if the security update is not applied.



What is the Vulnerability Detail?

An insecure de-serialization exists in Spring Core Framework. The vulnerability is due to insufficient validation of user supplied inputs and could lead to remote code execution.

The official advisory reads "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".



Has the Vendor Released an Advisory?

An advisory has been published by both Spring and VMware, who supports Spring. See the Appendix for a link to "Spring Framework RCE, Early Announcement" and "CVE-2022-22965: Spring Framework RCE via Data Binding on JDK 9+".



What Versions of Spring Core are Vulnerable?

The official advisory states that the following prerequisites for the exploit:

  • JDK 9 or higher
  • Apache Tomcat as the Servlet container
  • Packaged as a traditional WAR (in contrast to a Spring Boot executable jar)
  • spring-webmvc or spring-webflux dependency
  • Spring Framework versions 5.3.0 to 5.3.17, 5.2.0 to 5.2.19, and older versions


Has a CVE been Assigned to the Vulnerability?

CVE-2022-22965 has been assigned to the vulnerability.

There is a lot of online chatter about SpringShell being related to CVE-2022-22963 or CVE-2022-27772, but that is not the case.


CVE-2022-22963 is a vulnerability in Spring Cloud and was patched on March 29, 2022.

CVE-2022-27772 is a vulnerability in Spring Boot that allows temporary directory hijacking.



Has the Vendor Released a Patch?

Yes, the fix was released on March 31, 2022 for the following versions of Spring Framework:

  • 5.3.18
  • 5.2.20


What is the Status of Coverage?

FortiGuard Labs provides the following IPS coverage for SpringShell as (20.287):

Spring.Framework.SerializationUtils.Insecure.Deserialization


For a full list of protections and please see the Fortinet Outbreak Alert.


What Mitigation Steps are Available?

Workarounds are available in the advisory published by Spring. See the Appendix for a link to "Spring Framework RCE, Early Announcement".

description-logoOutbreak Alert

A remote code execution vulnerability exists in Spring Framework with JDK version 9 due to an insecure deserialization exploit. The exploit is based on insufficient validation of input that an attacker can perform a remote code execution. Spring is encouraging customers to upgrade to Spring Framework 5.3.18 and 5.2.20 or follow the suggested workarounds.

View the full Outbreak Alert Report

Telemetry