CVE-2026-59427
Patch Available.
This Vulnerability has been fixed in the Never-Ending Support (NES) version offered by HeroDevs.
Overview
Spring Cloud Gateway is an API gateway built on top of the Spring ecosystem. It provides a simple, yet effective way to route requests to APIs and to apply cross-cutting concerns to them, such as security, monitoring and metrics, and resiliency.
An information exposure vulnerability (CVE-2026-59427) has been identified in the Spring Cloud Gateway local response cache, which allows attackers to read responses that were meant for another, authenticated user. When an upstream marks a response as private or no-store together with other Cache-Control directives, the gateway still stores it and serves it to later requests without contacting the upstream.
Per OWASP: Access control enforces policy such that users cannot act outside of their intended permissions. Failures typically lead to unauthorized information disclosure, modification, or destruction of all data or performing a business function outside the user's limits.
This issue affects multiple versions of Spring Cloud Gateway.
Details
Module Info
- Product: Spring Cloud Gateway
- Affected packages:
org.springframework.cloud:spring-cloud-gateway-server,org.springframework.cloud:spring-cloud-gateway-server-webflux - Affected versions:
org.springframework.cloud:spring-cloud-gateway-server: >=4.0.0 <=4.2.10, >=4.3.0 <=4.3.6org.springframework.cloud:spring-cloud-gateway-server-webflux: >=5.0.0 <=5.0.4- GitHub repository: https://github.com/spring-cloud/spring-cloud-gateway
- Published packages: https://central.sonatype.com/artifact/org.springframework.cloud/spring-cloud-gateway-server, https://central.sonatype.com/artifact/org.springframework.cloud/spring-cloud-gateway-server-webflux
- Package manager: Maven
- Fixed in:
- OSS Spring Cloud Gateway 5.0.5
- NES for Spring Cloud Gateway
Vulnerability Info
This High-severity vulnerability is found in the spring-cloud-gateway-server and spring-cloud-gateway-server-webflux packages in multiple versions of Spring Cloud Gateway.
The LocalResponseCache gateway filter and global filter store upstream responses so that later matching requests can be answered from the cache. Before storing a response, ResponseCacheManager checks that the status code is cacheable, that the Cache-Control header allows caching, and that Vary is not *:
private static final List<String> forbiddenCacheControlValues = Arrays.asList("private", "no-store");
boolean isResponseCacheable(ServerHttpResponse response) {
return isStatusCodeToCache(response) && isCacheControlAllowed(response) && !isVaryWildcard(response);
}
private boolean isCacheControlAllowed(HttpMessage request) {
HttpHeaders headers = request.getHeaders();
List<String> cacheControlHeader = headers.getOrEmpty(HttpHeaders.CACHE_CONTROL);
return cacheControlHeader.stream().noneMatch(forbiddenCacheControlValues::contains);
}isCacheControlAllowed compares each complete Cache-Control header value with the exact strings private and no-store. A Cache-Control value is a comma-separated list of directives, but the header is never split into them. A value such as private, no-store, or the Spring Security default no-cache, no-store, max-age=0, must-revalidate, matches neither string, so the check passes and the response is written to the route cache. Directive names are also matched case-sensitively, so a value such as Private is accepted as well.
Once such a response is cached, a later GET request for the same route and cache key is answered from the cache without reaching the upstream. If the upstream returned user-specific content for an authenticated request and does not distinguish callers with a Vary header, an unauthenticated attacker can request the same URL and receive that content. Applications are affected only when LocalResponseCache is enabled on a route whose upstream returns private responses with more than one Cache-Control directive.
Mitigation
Only recent versions of Spring Cloud Gateway receive community support. Older lines are End-of-Life and will not receive public updates to address this issue.
Users of the affected components should apply one of the following mitigations:
- Upgrade to a currently supported version of Spring Cloud Gateway.
- Leverage a commercial support partner like HeroDevs for post-EOL security support.
Credits
- hussst (finder)
- Yu Yicheng (finder)