CVE-2026-59390

Incorrectly Configured Access Control
Affects
Spring Framework
in
Spring
No items found.
Versions
>=7.0.0 <=7.0.10, >=6.2.0 <=6.2.20, >=6.1.0 <=6.1.29, >=6.0.0 <=6.0.32, >=5.3.0 <=5.3.50, <=5.2.26.RELEASE

Patch Available.

Exclamation circle icon
Patch Available

This Vulnerability has been fixed in the Never-Ending Support (NES) version offered by HeroDevs.

Overview

Spring Framework is the foundational Java application framework of the Spring portfolio, providing dependency injection, Spring MVC and WebFlux web support, and WebSocket messaging for building enterprise applications.

An incorrectly configured access control vulnerability (CVE-2026-59390) has been identified in Spring Framework's WebSocket support, which allows attackers to open WebSocket connections to an application from a page served on a different origin when the application configures WebSocketHttpRequestHandler directly without an origin check. This can result in cross-site WebSocket hijacking.

Per OWASP: Browsers include cookies in WebSocket handshake requests, making WebSocket applications vulnerable to Cross-Site WebSocket Hijacking (CSWSH). CSWSH allows attackers to hijack authenticated WebSocket connections from malicious websites.

This issue affects multiple versions of Spring Framework.

Details

Module Info

Vulnerability Info

This Medium-severity vulnerability is found in the org.springframework:spring-websocket and org.springframework:spring-webflux packages in multiple versions of Spring Framework. It has a CVSS 3.1 base score of 5.9 (AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:L/A:N).

Spring Framework's WebSocketHttpRequestHandler validates the Origin header of a WebSocket handshake only when an OriginHandshakeInterceptor is part of the handshake interceptor chain. The WebSocket configuration support (WebSocketHandlerRegistry) sets this up for the application, so applications that register their handlers through it are not affected. An application can also expose a WebSocket endpoint by creating a WebSocketHttpRequestHandler itself and mapping it to a URL. In that case the handler runs whatever interceptors it was given, and nothing else:

public void setHandshakeInterceptors(@Nullable List<HandshakeInterceptor> interceptors) {
        this.interceptors.clear();
        if (interceptors != null) {
                this.interceptors.addAll(interceptors);
        }
}

@Override
public void handleRequest(HttpServletRequest servletRequest, HttpServletResponse servletResponse)
                throws ServletException, IOException {

        ServerHttpRequest request = new ServletServerHttpRequest(servletRequest);
        ServerHttpResponse response = new ServletServerHttpResponse(servletResponse);

        HandshakeInterceptorChain chain = new HandshakeInterceptorChain(this.interceptors, this.wsHandler);
        ...
        if (!chain.applyBeforeHandshake(request, response, attributes)) {
                return;
        }
        this.handshakeHandler.doHandshake(request, response, this.wsHandler, attributes);
        ...
}

handleRequest never compares the request's Origin header with the server's own origin. When no OriginHandshakeInterceptor is configured, a handshake request from any origin goes straight to doHandshake and the connection is upgraded. Browsers do not apply the same-origin policy to WebSocket connections and send the user's cookies with the handshake request. A malicious page that a logged-in user visits can therefore open a WebSocket connection to the application under the user's session, read the messages the server sends on it, and send messages as that user.

Mitigation

Only recent versions of Spring Framework 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 Framework.
  • Leverage a commercial support partner like HeroDevs for post-EOL security support.

Credits

  • Xint (finder)
Vulnerability Details
Severity
Level
CVSS Assessment
Low
>=0 <4
Medium
>=4 <6
High
>=6 <8
Critical
>=8 <10
Medium
ID
CVE-2026-59390
PROJECT Affected
Spring Framework
Versions Affected
>=7.0.0 <=7.0.10, >=6.2.0 <=6.2.20, >=6.1.0 <=6.1.29, >=6.0.0 <=6.0.32, >=5.3.0 <=5.3.50, <=5.2.26.RELEASE
NES Versions Affected
Published date
November 20, 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.