Spring Cloud Gateway Global LocalResponseCache Leaks Responses Across Routes

HIGH | NOVEMBER 19, 2026 | CVE-2026-59426

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 Spring Products and Versions

Spring Cloud Gateway:

  • 5.0.0 - 5.0.4
  • 4.3.0 - 4.3.6
  • 4.0.0 - 4.2.10

Mitigation

Users of affected versions should upgrade to the corresponding fixed version.
Fix versionAvailability
5.0.5OSS
5.0.4.1Enterprise Support Only
4.3.7Enterprise Support Only
4.2.11Enterprise Support Only

Disable the global LocalResponseCache and configure the route-level LocalResponseCache filter on the routes that need caching, as each route-level filter uses its own cache. The global cache is disabled by setting spring.cloud.gateway.server.webflux.global-filter.local-response-cache.enabled=false (spring.cloud.gateway.global-filter.local-response-cache.enabled=false on 4.2.x).

Credit

This vulnerability was discovered and responsibly reported by husss.

History

  • 2026-11-19: Initial vulnerability report published.

Get ahead

VMware offers training and certification to turbo-charge your progress.

Learn more

Get support

TrueSource Spring Enterprise offers support and binaries for OpenJDK™, Spring, and Apache Tomcat® in one simple subscription.

Learn more

Upcoming events

Check out all the upcoming events in the Spring community.

View all