CVE-2026-59398

Denial of Service
Affects
Spring Framework
in
Spring
No items found.
Versions
>=5.0.0 <=5.2.26.RELEASE, >=5.3.0 <=5.3.50, >=6.0.0 <=6.0.32, >=6.1.0 <=6.1.29, >=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 core application framework of the Spring portfolio for building Java applications. Its web modules, Spring MVC for Servlet applications and Spring WebFlux for reactive applications, handle request mapping, data binding and content negotiation, the process of choosing the response media type from what the client asks for.

A denial of service vulnerability (CVE-2026-59398) has been identified in the parameter-based content negotiation of Spring MVC and Spring WebFlux, which allows attackers to make the application consume memory without limit by sending requests with many distinct format parameter values. The growing memory use can eventually make the application unavailable.

Per OWASP: The Denial of Service (DoS) attack is focused on making a resource (site, application, server) unavailable for the purpose it was designed.

This issue affects multiple versions of Spring Framework.

Details

Module Info

Vulnerability Info

This Medium-severity vulnerability is found in the spring-web and spring-webflux packages in multiple versions of Spring Framework. An application is vulnerable when it uses Spring MVC or Spring WebFlux, enables parameter-based content negotiation (for example, the format query parameter), and, for Spring MVC, does not restrict content negotiation to registered extensions only (useRegisteredExtensionsOnly).

In Spring MVC, ParameterContentNegotiationStrategy reads the media type key straight from the request parameter. When the key is not one of the configured mappings, AbstractMappingContentNegotiationStrategy asks handleNoMatch for a fallback, which resolves the key through MediaTypeFactory, and then stores the result under the key the client supplied:

mediaType = handleNoMatch(webRequest, key);
if (mediaType != null) {
	addMapping(key, mediaType);
	return Collections.singletonList(mediaType);
}
protected MediaType handleNoMatch(NativeWebRequest request, String key)
		throws HttpMediaTypeNotAcceptableException {

	if (!isUseRegisteredExtensionsOnly()) {
		Optional<MediaType> mediaType = MediaTypeFactory.getMediaType("file." + key);
		if (mediaType.isPresent()) {
			return mediaType.get();
		}
	}
	...
}

Spring WebFlux's ParameterContentTypeResolver follows the same pattern with a shared ConcurrentHashMap:

key = formatKey(key);
MediaType match = this.mediaTypes.get(key);
if (match == null) {
	match = MediaTypeFactory.getMediaType("filename." + key)
			.orElseThrow(() -> {
				List<MediaType> supported = new ArrayList<>(this.mediaTypes.values());
				return new NotAcceptableStatusException(supported);
			});
}
this.mediaTypes.putIfAbsent(key, match);

MediaTypeFactory derives the media type from the text after the last dot of the file name it is given, so values such as a.json, b.json and c.json all resolve to application/json while each is a distinct key. Every such request adds a new entry to a map that lives as long as the application and is never pruned. An unauthenticated attacker can send an unlimited number of requests with different format values, growing the map until the application runs out of memory and stops serving legitimate users.

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

Daehyun Kang (finder)

Vulnerability Details
Severity
Level
CVSS Assessment
Low
>=0 <4
Medium
>=4 <6
High
>=6 <8
Critical
>=8 <10
Medium
ID
CVE-2026-59398
PROJECT Affected
Spring Framework
Versions Affected
>=5.0.0 <=5.2.26.RELEASE, >=5.3.0 <=5.3.50, >=6.0.0 <=6.0.32, >=6.1.0 <=6.1.29, >=6.2.0 <=6.2.20, >=7.0.0 <=7.0.10
NES Versions Affected
Published date
November 20, 2026
≈ Fix date
Category
Denial of Service
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.