CVSS2
Attack Vector
NETWORK
Attack Complexity
LOW
Authentication
NONE
Confidentiality Impact
PARTIAL
Integrity Impact
PARTIAL
Availability Impact
PARTIAL
AV:N/AC:L/Au:N/C:P/I:P/A:P
CVSS3
Attack Vector
NETWORK
Attack Complexity
LOW
Privileges Required
NONE
User Interaction
NONE
Scope
UNCHANGED
Confidentiality Impact
HIGH
Integrity Impact
HIGH
Availability Impact
HIGH
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS
Percentile
100.0%
Spring Framework prior to versions 5.2.20 and 5.3.18 contains a remote code execution vulnerability known as Spring4Shell
.
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:
spring-webmvc
or spring-webflux
dependencyFor those who are unable to upgrade, leaked reports recommend setting disallowedFields
on WebDataBinder
through an @ControllerAdvice
. This works generally, but as a centrally applied workaround fix, may leave some loopholes, in particular if a controller sets disallowedFields
locally through its own @InitBinder
method, which overrides the global setting.
To apply the workaround in a more fail-safe way, applications could extend RequestMappingHandlerAdapter
to update the WebDataBinder
at the end after all other initialization. In order to do that, a Spring Boot application can declare a WebMvcRegistrations
bean (Spring MVC) or a WebFluxRegistrations
bean (Spring WebFlux).
Vendor | Product | Version | CPE |
---|---|---|---|
org.springframework | spring-webflux | * | cpe:2.3:a:org.springframework:spring-webflux:*:*:*:*:*:*:*:* |
org.springframework | spring-webmvc | * | cpe:2.3:a:org.springframework:spring-webmvc:*:*:*:*:*:*:*:* |
org.springframework | spring-beans | * | cpe:2.3:a:org.springframework:spring-beans:*:*:*:*:*:*:*:* |
org.springframework.boot | spring-boot-starter-webflux | * | cpe:2.3:a:org.springframework.boot:spring-boot-starter-webflux:*:*:*:*:*:*:*:* |
org.springframework.boot | spring-boot-starter-web | * | cpe:2.3:a:org.springframework.boot:spring-boot-starter-web:*:*:*:*:*:*:*:* |
packetstormsecurity.com/files/166713/Spring4Shell-Code-Execution.html
packetstormsecurity.com/files/167011/Spring4Shell-Spring-Framework-Class-Property-Remote-Code-Execution.html
cert-portal.siemens.com/productcert/pdf/ssa-254054.pdf
github.com/advisories/GHSA-36p3-wjmg-h94x
github.com/spring-projects/spring-boot/releases/tag/v2.5.12
github.com/spring-projects/spring-boot/releases/tag/v2.6.6
github.com/spring-projects/spring-framework/commit/002546b3e4b8d791ea6acccb81eb3168f51abb15
github.com/spring-projects/spring-framework/releases/tag/v5.2.20.RELEASE
github.com/spring-projects/spring-framework/releases/tag/v5.3.18
nvd.nist.gov/vuln/detail/CVE-2022-22965
psirt.global.sonicwall.com/vuln-detail/SNWLID-2022-0005
spring.io/blog/2022/03/31/spring-framework-rce-early-announcement
tanzu.vmware.com/security/cve-2022-22965
tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-java-spring-rce-Zx9GUc67
www.oracle.com/security-alerts/cpuapr2022.html
www.oracle.com/security-alerts/cpujul2022.html
CVSS2
Attack Vector
NETWORK
Attack Complexity
LOW
Authentication
NONE
Confidentiality Impact
PARTIAL
Integrity Impact
PARTIAL
Availability Impact
PARTIAL
AV:N/AC:L/Au:N/C:P/I:P/A:P
CVSS3
Attack Vector
NETWORK
Attack Complexity
LOW
Privileges Required
NONE
User Interaction
NONE
Scope
UNCHANGED
Confidentiality Impact
HIGH
Integrity Impact
HIGH
Availability Impact
HIGH
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS
Percentile
100.0%