CVE-2026-59428

Incorrectly Configured Access Control
Affects
Spring Cloud Gateway
in
Spring
No items found.
Versions
>=3.1.0 <=3.1.14, >=4.2.0 <=4.2.10, >=4.3.0 <=4.3.6, >=5.0.0 <=5.0.4

Patch Available.

Exclamation circle icon
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, effective way to route requests to backend services and to apply cross-cutting concerns such as security, monitoring and resiliency to them.

An incorrectly configured access control vulnerability (CVE-2026-59428) has been identified in the WebSocket routing filter of Spring Cloud Gateway, which allows attackers to open a WebSocket connection through the gateway to a backend service from a malicious web page, using the victim's cookies. This is a form of Cross-Site WebSocket Hijacking, which can expose the data the backend sends over the socket and let the attacker send messages as the victim.

Per OWASP: Cross-Site Request Forgery (CSRF) is an attack that forces an end user to execute unwanted actions on a web application in which they're currently authenticated.

This issue affects multiple versions of Spring Cloud Gateway.

Details

Module Info

Vulnerability Info

This Medium-severity vulnerability is found in the spring-cloud-gateway-server and spring-cloud-gateway-server-webflux packages in multiple versions of Spring Cloud Gateway. Applications are affected only if they expose a route with a ws or wss URI through the gateway.

Browsers do not apply the same-origin policy or CORS to WebSocket handshakes. They send the Origin header with the handshake and rely on the server to accept or reject it. WebsocketRoutingFilter never reads that header. Once a request resolves to a ws or wss route URL, the filter hands it straight to the WebSocket service and starts proxying:

@Override
public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) {
    changeSchemeIfIsWebSocketUpgrade(exchange);

    URI requestUrl = exchange.getRequiredAttribute(GATEWAY_REQUEST_URL_ATTR);
    String scheme = requestUrl.getScheme();

    if (isAlreadyRouted(exchange) || (!"ws".equals(scheme) && !"wss".equals(scheme))) {
        return chain.filter(exchange);
    }
    setAlreadyRouted(exchange);

    HttpHeaders headers = exchange.getRequest().getHeaders();
    HttpHeaders filtered = filterRequest(getHeadersFilters(), exchange);

    List<String> protocols = getProtocols(headers);

    return this.webSocketService.handleRequest(exchange,
            new ProxyWebSocketHandler(requestUrl, this.webSocketClient, filtered, protocols));
}

The header filters the gateway applies here remove only the Host header, the Sec-WebSocket-* headers and hop-by-hop headers, so the Cookie header the browser attached to the handshake is forwarded to the backend when ProxyWebSocketHandler opens the upstream connection. A page on any origin that the victim visits can therefore run new WebSocket("wss://gateway.example.com/ws-route"). The gateway accepts the cross-origin handshake and connects to the backend with the victim's session. The attacker's script can then read every message the backend sends and send messages of its own in the victim's name.

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.
Vulnerability Details
Severity
Level
CVSS Assessment
Low
>=0 <4
Medium
>=4 <6
High
>=6 <8
Critical
>=8 <10
Medium
ID
CVE-2026-59428
PROJECT Affected
Spring Cloud Gateway
Versions Affected
>=3.1.0 <=3.1.14, >=4.2.0 <=4.2.10, >=4.3.0 <=4.3.6, >=5.0.0 <=5.0.4
NES Versions Affected
Published date
November 19, 2026
≈ Fix date
Category
Incorrectly Configured Access Control
Vex Document
Download VEXHow do I use it?
Sign up for the latest vulnerability alerts fixed in
NES for Spring
Rss feed icon
Subscribe via RSS
or

By submitting the form I acknowledge receipt of our Privacy Policy.

Thanks for signing up for our Newsletter! We look forward to connecting with you.
Oops! Something went wrong while submitting the form.