Miggo Logo

CVE-2024-38821: Spring Security vulnerable to Authorization Bypass of Static Resources in WebFlux Applications

9.1

CVSS Score
3.1

Basic Information

EPSS Score
0.94029%
Published
10/28/2024
Updated
1/24/2025
KEV Status
No
Technology
TechnologyJava

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
org.springframework.security:spring-security-webmaven< 5.7.135.7.13
org.springframework.security:spring-security-webmaven>= 5.8.0, < 5.8.155.8.15
org.springframework.security:spring-security-webmaven>= 6.2.0, < 6.2.76.2.7
org.springframework.security:spring-security-webmaven>= 6.0.0, < 6.0.136.0.13
org.springframework.security:spring-security-webmaven>= 6.1.0, < 6.1.116.1.11
org.springframework.security:spring-security-webmaven>= 6.3.0, < 6.3.46.3.4

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability (CVE-2024-38821) describes an authorization bypass for static resources in Spring WebFlux applications due to un-normalized URLs. The provided patches (commits 0e257b56ce35402558a260ffa6b368982f9a7934 and 4ce7cde15599c0447163fd46bac616e03318bf5b) introduce a ServerWebExchangeFirewall (specifically StrictServerWebExchangeFirewall) into the org.springframework.security.web.server.WebFilterChainProxy class. The core change is within the filter method of WebFilterChainProxy. Before this patch, the filter method took the ServerWebExchange and directly used it (and its associated request path) to determine which security filters to apply, notably in the call securityWebFilterChain.matches(exchange). The StrictServerWebExchangeFirewall added by the patch is designed to, among other things, ensure URL normalization. The fact that this firewall was added here indicates that the filter method was previously processing potentially un-normalized (and thus malicious) request paths. This un-normalized input could then lead to incorrect matching and bypass of security constraints for static resources. Therefore, WebFilterChainProxy.filter is identified as the vulnerable function because it processed the unsanitized, potentially malicious input (the un-normalized URL in ServerWebExchange) and used it for security-sensitive matching operations.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

Sprin* W***lux *ppli**tions t**t **v* Sprin* S**urity *ut*oriz*tion rul*s on st*ti* r*sour**s **n ** *yp*ss** un**r **rt*in *ir*umst*n**s. *or t*is to imp**t *n *ppli**tion, *ll o* t** *ollowin* must ** tru*: * It must ** * W***lux *ppli**tion

Reasoning

T** vuln*r**ility (*V*-****-*****) **s*ri**s *n *ut*oriz*tion *yp*ss *or st*ti* r*sour**s in Sprin* W***lux *ppli**tions *u* to un-norm*liz** URLs. T** provi*** p*t***s (*ommits **************************************** *n* ***************************