Spring Framework < 5.2.20 / 5.3.x < 5.3.18 Remote Code Execution (Spring4Shell)

critical Web Application Scanning Plugin ID 113217

Language:

Synopsis

Spring Framework < 5.2.20 / 5.3.x < 5.3.18 Remote Code Execution (Spring4Shell)

Description

Spring MVC and Spring WebFlux applications, when packaged as a traditional WAR file, running on JDK version 9 and higher in an Apache Tomcat servlet container and exposing one or more endpoints with DataBinder enabled, suffer from a Remote Code Execution (RCE) vulnerability.

By crafting a specific HTTP request, an attacker could leverage the vulnerability to compromise the target by, for example, hosting a web shell on the target application.

Solution

Depending on the current application version branch, update at least to Spring Framework 5.2.20 or 5.3.18. Due to its dependency to Spring Framework, Spring Boot should also be updated at least to versions 2.5.12 or 2.6.6. The Apache Tomcat team has released versions 10.0.20, 9.0.62, and 8.5.78 all of which close the attack vector on Tomcat's side.

See Also

https://tanzu.vmware.com/security/cve-2022-22965

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

https://spring.io/blog/2022/04/01/spring-framework-rce-mitigation-alternative

Plugin Details

Severity: Critical

ID: 113217

Type: remote

Published: 3/31/2022

Updated: 4/7/2022

Scan Template: pci, api, scan

Risk Information

VPR

Risk Factor: Critical

Score: 9.5

CVSS v2

Risk Factor: High

Base Score: 7.5

Vector: CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P

CVSS Score Source: CVE-2022-22965

CVSS v3

Risk Factor: Critical

Base Score: 9.8

Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

CVSS Score Source: CVE-2022-22965

Vulnerability Information

CPE: cpe:2.3:a:vmware:spring_security:*:*:*:*:*:*:*:*

Exploit Available: true

Exploit Ease: Exploits are available

Patch Publication Date: 3/31/2022

Vulnerability Publication Date: 3/30/2022

Reference Information

CVE: CVE-2022-22965