CVE-2026-59394

URL Redirect/Open Redirect
Affects
Spring Framework
in
Spring
No items found.
Versions
>=6.2.0 <=6.2.20, >=7.0.0 <=7.0.10

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 application framework of the Spring portfolio, providing dependency injection, transaction management, and the Spring MVC and Spring WebFlux web frameworks for building Java applications.

An open redirect/URL redirect vulnerability (CVE-2026-59394) has been identified in the UrlHandlerFilter of Spring Framework, which allows attackers to craft a request URL that makes the filter redirect users to an attacker-chosen origin. This issue is a follow-up to CVE-2026-47883, whose leading-slash handling did not cover every input.

Per OWASP: Unvalidated redirects and forwards are possible when a web application accepts untrusted input that could cause the web application to redirect the request to a URL contained within untrusted input. By modifying untrusted URL input to a malicious site, an attacker may successfully launch a phishing scam and steal user credentials.

This issue affects multiple versions of Spring Framework.

‍

Details

Module Info

Vulnerability Info

This Medium-severity vulnerability is found in the org.springframework:spring-webmvc and org.springframework:spring-webflux packages in multiple versions of Spring Framework. Applications are affected when they use UrlHandlerFilter (Servlet or reactive variant, shipped in spring-web) to redirect requests in order to remove a trailing slash.

The redirect handler builds the Location header directly from the request path, with the trailing slash trimmed. It then tries to stop the path from being read as a protocol-relative URL, but only removes one leading slash, and only when the third character is not also a slash:

String location = trimTrailingSlash(request.getRequestURI());
if (location.length() > 2 && location.startsWith("//")) {
    location = (location.charAt(2) != '/' ? location.substring(1) : location);
}
response.resetBuffer();
response.setStatus(this.httpStatus.value());
response.setHeader(HttpHeaders.LOCATION, location);

A path that starts with three or more slashes, such as ///attacker.example/x/, is therefore left untouched, and the filter responds with Location: ///attacker.example/x. Browsers resolve a location that starts with several slashes against the current scheme and treat the first path segment as a host name, so the user is sent to attacker.example. The reactive UrlHandlerFilter applies the same check to the path taken from the ServerHttpRequest. Releases that do not include the CVE-2026-47883 change have no leading-slash handling at all and send any such path straight to the Location header. An attacker only needs to get a victim to open a crafted link on the trusted application's host to start the redirect.

Steps to Reproduce

1. Register a UrlHandlerFilter that redirects requests with a trailing slash:

UrlHandlerFilter filter = UrlHandlerFilter
        .trailingSlashHandler("/**").redirect(HttpStatus.PERMANENT_REDIRECT)
        .build();

2. Send a request whose path starts with three slashes and ends with a slash:

curl -i --path-as-is "http://localhost:8080///attacker.example/x/"

3. Observe that the response carries Location: ///attacker.example/x, which a browser follows to attacker.example.

‍

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

  • h1ei1 (finder)
  • Opensec Intelligence (finder)
  • Joe Kuhel from HeroDevs (finder)
  • YongHo Shin from eGovFrame Center (Korea) (finder)
  • kuron3k0 (finder)
Vulnerability Details
Severity
Level
CVSS Assessment
Low
>=0 <4
Medium
>=4 <6
High
>=6 <8
Critical
>=8 <10
Medium
ID
CVE-2026-59394
PROJECT Affected
Spring Framework
Versions Affected
>=6.2.0 <=6.2.20, >=7.0.0 <=7.0.10
NES Versions Affected
Published date
November 20, 2026
≈ Fix date
Category
URL Redirect/Open Redirect
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.