CVE-2026-59426
Spring Cloud Gateway Global LocalResponseCache Leaks Responses Across Routes
Description
Spring Cloud Gateway's global LocalResponseCache filter uses a single cache shared by every route that does not configure the route-level LocalResponseCache filter. The cache key is built from the request URI, the Authorization header, the request cookies, and any request headers named in the response's Vary header. The route that handled the request is not part of the key.
When routes match the same request URI but are selected by different predicates (for example RemoteAddr, Host, Header, Cookie, Query, or custom predicates) and forward to different upstreams, a response cached for one route can be returned to a caller that matches only another route. For example, a response cached for a restricted route can be served to a caller that matches only a public route, without that request reaching either upstream. An unauthenticated attacker can exploit this to read responses that were meant for a different audience.
Applications are affected only if the global LocalResponseCache is enabled and at least two routes that use it match the same request URI but are separated by predicates that do not influence the cache key. Routes that configure the route-level LocalResponseCache filter use their own per-route cache and are not affected.
Affected Maven artifacts (1)
| Artifact | Affected versions | Fixed in |
|---|---|---|
| org.springframework.cloud » spring-cloud-gateway-server | >= 4.0.0, <= 4.2.10>= 4.3.0, <= 4.3.6>= 5.0.0, < 5.0.5 | 5.0.5 |
Blast radius
60% of the dependent artifacts (32) still pull an affected version in their latest release.
| Depth | Dependent versions |
|---|---|
| Direct | 148 |
| 2 hops | 241 |
| 3 hops | 52 |
| 4 hops | 56 |
Most used dependents
- org.springframework.cloud » spring-cloud-starter-gateway325 usages
- org.springframework.cloud » spring-cloud-starter-gateway-server-webflux88 usages
- org.springframework.cloud » spring-cloud-gateway-server-webflux31 usages
- io.github.appiaworks » shiguchi-spring-boot3-autoconfigure6 usages
- io.gitee.gzcltech.security » security-service-jwt-gateway-starter4 usages
- io.gitee.gzcltech.security » security-service-jwt-gateway-federation-starter2 usages
- net.bretti.openapi-route-definition-locator » openapi-route-definition-locator-core1 usages
- com.contentgrid.thunx » thunx-spring-gateway1 usages
- com.github.sdp-tech-nj » sdp-spring-reactive-cloud-service1 usages
- io.github.appiaworks » shiguchi-graphql-spring-boot3-starter1 usages
- io.github.appiaworks » shiguchi-openapi-spring-boot3-starter1 usages
- io.gitee.gzcltech.security » security-service-jwt-gateway1 usages
- io.owlframework » owl-swagger-gateway-spring-boot-starter1 usages
- io.gitee.gzcltech.security » security-service-token-gateway-federation-starter-redis1 usages
- io.github.breninsul » webflux-logging1 usages
Computed from the dependency graph of build 20261127.1117 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.
