Логотип exploitDog
Консоль
Логотип exploitDog

exploitDog

github логотип

GHSA-36p3-wjmg-h94x

Опубликовано: 31 мар. 2022
Источник: github
Github: Прошло ревью
CVSS3: 9.8

Описание

Remote Code Execution in Spring Framework

Spring Framework prior to versions 5.2.20 and 5.3.18 contains a remote code execution vulnerability known as Spring4Shell.

Impact

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

Patches

Workarounds

For 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).

Пакеты

Наименование

org.springframework:spring-beans

maven
Затронутые версииВерсия исправления

< 5.2.20.RELEASE

5.2.20.RELEASE

Наименование

org.springframework:spring-beans

maven
Затронутые версииВерсия исправления

>= 5.3.0, < 5.3.18

5.3.18

Наименование

org.springframework:spring-webmvc

maven
Затронутые версииВерсия исправления

< 5.2.20.RELEASE

5.2.20.RELEASE

Наименование

org.springframework:spring-webmvc

maven
Затронутые версииВерсия исправления

>= 5.3.0, < 5.3.18

5.3.18

Наименование

org.springframework.boot:spring-boot-starter-web

maven
Затронутые версииВерсия исправления

< 2.5.12

2.5.12

Наименование

org.springframework.boot:spring-boot-starter-web

maven
Затронутые версииВерсия исправления

>= 2.6.0, < 2.6.6

2.6.6

Наименование

org.springframework:spring-webflux

maven
Затронутые версииВерсия исправления

< 5.2.20.RELEASE

5.2.20.RELEASE

Наименование

org.springframework:spring-webflux

maven
Затронутые версииВерсия исправления

>= 5.3.0, < 5.3.18

5.3.18

Наименование

org.springframework.boot:spring-boot-starter-webflux

maven
Затронутые версииВерсия исправления

< 2.5.12

2.5.12

Наименование

org.springframework.boot:spring-boot-starter-webflux

maven
Затронутые версииВерсия исправления

>= 2.6.0, < 2.6.6

2.6.6

EPSS

Процентиль: 100%
0.9446
Критический

9.8 Critical

CVSS3

Дефекты

CWE-74
CWE-94

Связанные уязвимости

CVSS3: 9.8
ubuntu
около 3 лет назад

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.

CVSS3: 8.1
redhat
около 3 лет назад

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.

CVSS3: 9.8
nvd
около 3 лет назад

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.

CVSS3: 9.8
debian
около 3 лет назад

A Spring MVC or Spring WebFlux application running on JDK 9+ may be vu ...

CVSS3: 8.8
fstec
около 3 лет назад

Уязвимость модуля Spring Core программной платформы Spring Framework, позволяющая нарушителю выполнить произвольный код

EPSS

Процентиль: 100%
0.9446
Критический

9.8 Critical

CVSS3

Дефекты

CWE-74
CWE-94