CVE-2022-22965
Remote Code Execution in Spring Framework
Aktiv ausgenutzt
Diese Schwachstelle steht in einem Katalog bekannt ausgenutzter Schwachstellen, aufgenommen am 2022-04-04. Frist für US-Bundesbehörden: 2022-04-25.
Apply updates per vendor instructions.
Auswirkung
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 - Spring Framework [5.3.18](https://github.com/spring-projects/spring-framework/releases/tag/v5.3.18) and [5.2.20](https://github.com/spring-projects/spring-framework/releases/tag/v5.2.20.RELEASE) - Spring Boot [2.6.6](https://github.com/spring-projects/spring-boot/releases/tag/v2.6.6) and [2.5.12](https://github.com/spring-projects/spring-boot/releases/tag/v2.5.12) ## 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).
Ein Angreifer kann die Lücke über das Netzwerk ausnutzen, ohne Anmeldung, ohne Zutun eines Nutzers. Bei Erfolg: hohes Risiko, dass Daten ausgelesen werden, hohes Risiko, dass Daten oder Systeme verändert werden, hohes Risiko für Ausfälle.
Betroffene Pakete
| Ökosystem | Paket | Betroffen | Behoben in |
|---|---|---|---|
| maven | org.springframework:spring-beans | >= 5.3.0, < 5.3.18 | 5.3.18 |
| maven | org.springframework:spring-webmvc | >= 5.3.0, < 5.3.18 | 5.3.18 |
| maven | org.springframework.boot:spring-boot-starter-web | < 2.5.12 | 2.5.12 |
| maven | org.springframework:spring-webflux | >= 5.3.0, < 5.3.18 | 5.3.18 |
| maven | org.springframework.boot:spring-boot-starter-webflux | < 2.5.12 | 2.5.12 |
Betroffene Produkte
| Hersteller | Produkt | Betroffene Versionen |
|---|---|---|
| Cisco | Cx Cloud Agent | vor 2.1.0 |
| Oracle | Communications Cloud Native Core Automated Test Suite | Versionen 1.9.0, 22.1.0 |
| Oracle | Communications Cloud Native Core Console | Versionen 1.9.0, 22.1.0 |
| Oracle | Communications Cloud Native Core Network Exposure Function | Version 22.1.0 |
| Oracle | Communications Cloud Native Core Network Function Cloud Native Environment | Versionen 1.10.0, 22.1.0 |
| Oracle | Communications Cloud Native Core Network Repository Function | Versionen 1.15.0, 22.1.0 |
| Oracle | Communications Cloud Native Core Network Slice Selection Function | Versionen 1.8.0, 1.15.0, 22.1.0 |
| Oracle | Communications Cloud Native Core Policy | Versionen 1.15.0, 22.1.0 |
| Oracle | Communications Cloud Native Core Security Edge Protection Proxy | Versionen 1.7.0, 22.1.0 |
| Oracle | Communications Cloud Native Core Unified Data Repository | Versionen 1.15.0, 22.1.0 |
| Oracle | Communications Policy Management | Version 12.6.0.0.0 |
| VMware | Spring Framework | vor 5.2.20 ab 5.3.0 vor 5.3.18 |
Schwachstellenklasse
Referenzen
- NVD-Eintrag
- CVE.org-Eintrag
- GitHub-Advisory
- CISA-KEV-Katalog
- http://packetstormsecurity.com/files/166713/Spring4Shell-Code-Execution.html
- http://packetstormsecurity.com/files/167011/Spring4Shell-Spring-Framework-Class-Property-Remote-Code-Execution.html
- https://cert-portal.siemens.com/productcert/pdf/ssa-254054.pdf
- https://psirt.global.sonicwall.com/vuln-detail/SNWLID-2022-0005
- https://tanzu.vmware.com/security/cve-2022-22965
- https://tools.cisco.com/security/center/content/CiscoSecurityAdvisory/cisco-sa-java-spring-rce-Zx9GUc67
- https://www.oracle.com/security-alerts/cpuapr2022.html
- https://www.oracle.com/security-alerts/cpujul2022.html
- https://www.kb.cert.org/vuls/id/970766
- https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2022-22965
- https://github.com/advisories/GHSA-36p3-wjmg-h94x
- https://nvd.nist.gov/vuln/detail/CVE-2022-22965
- https://github.com/spring-projects/spring-framework/commit/002546b3e4b8d791ea6acccb81eb3168f51abb15
- https://github.com/spring-projects/spring-boot/releases/tag/v2.5.12
- https://github.com/spring-projects/spring-boot/releases/tag/v2.6.6
- https://github.com/spring-projects/spring-framework/releases/tag/v5.2.20.RELEASE
- https://github.com/spring-projects/spring-framework/releases/tag/v5.3.18
- https://spring.io/blog/2022/03/31/spring-framework-rce-early-announcement