Spring Cloud Gateway WebSocket Routing Filter Does Not Enforce Same-Origin by Default

MEDIUM | NOVEMBER 19, 2026 | CVE-2026-59428

Description

Spring Cloud Gateway's WebsocketRoutingFilter accepts WebSocket handshakes without checking the Origin header. Browsers do not apply the same-origin policy or CORS to WebSocket handshakes. They only send the Origin header and rely on the server to accept or reject the request. Because the gateway does not reject cross-origin handshakes by default, a malicious web page can cause a victim's browser to open a WebSocket connection through the gateway to a backend service, using any credentials the browser attaches automatically, such as cookies.

Applications are affected only if they expose a route with a ws or wss URI through the gateway. Spring Cloud Gateway now rejects cross-origin WebSocket handshakes by default with a 403 Forbidden response, and provides the spring.cloud.gateway.server.webflux.websocket.allowed-origins and spring.cloud.gateway.server.webflux.websocket.allowed-origin-patterns properties (spring.cloud.gateway.websocket.* for the 4.x and 3.1.x lines) to allow specific origins.

Affected Spring Products and Versions

Spring Cloud Gateway:

  • 5.0.0 - 5.0.4
  • 4.3.0 - 4.3.6
  • 4.2.0 - 4.2.10
  • 3.1.0 - 3.1.14

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
3.1.15Enterprise Support Only

No further mitigation steps are necessary.

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