Static resource cache poisoning in Spring MVC and WebFlux
VMware Spring Framework
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| org.springframework:spring-webflux Maven |
|
|
| org.springframework:spring-webmvc Maven |
VMware Spring Framework
| Product | Affected | Fixed in |
|---|---|---|
| org.springframework:spring-webflux Maven |
|
|
| org.springframework:spring-webmvc Maven |
|
|
Spring MVC and WebFlux applications are vulnerable to cache poisoning when resolving static resources.
More precisely, an application can be vulnerable when all the following are true:
* the application is using Spring MVC or Spring WebFlux * the application is configuring the resource chain support https://docs.spring.io/spring-framework/reference/web/webmvc/mvc-config/static-resources.html#page-title with caching enabled * the application adds support for encoded resources resolution * the resource cache must be empty when the attacker has access to the application
When all the conditions above are met, the attacker can send malicious requests and poison the resource cache with resources using the wrong encoding. This can cause a denial of service by breaking the front-end application for clients.
From the CVE record · vmware
Spring MVC and WebFlux applications can be vulnerable when resource-chain caching and encoded-resource resolution are enabled and the resource cache is empty. An attacker who can send requests to the application under those conditions can poison the cache with wrongly encoded resources, potentially breaking the front end for clients and causing a denial of service.
Teams running Maven org.springframework:spring-webmvc or org.springframework:spring-webflux should check versions 7.0.0–7.0.6, 6.2.0–6.2.17, 6.1.0–6.1.26, and 5.3.47 or earlier.