CVE-2024-38821
Java vulnerability analysis and mitigation

Overview

CVE-2024-38821 is a critical vulnerability discovered in Spring WebFlux applications that allows authorization bypass of static resources under specific circumstances. The vulnerability was disclosed on October 22, 2024, affecting multiple versions of Spring Security including 5.7.0-5.7.12, 5.8.0-5.8.14, 6.0.0-6.0.12, 6.1.0-6.1.10, 6.2.0-6.2.6, and 6.3.0-6.3.3. For an application to be vulnerable, it must be a WebFlux application, use Spring's static resources support, and have a non-permitAll authorization rule applied to the static resources support (Spring Security).

Technical details

The vulnerability stems from how Spring WebFlux handles static resources and security filters. When security filters are bypassed, attackers can exploit crafted URL paths to access protected files. For example, manipulating the URL path from /index.html to //index.html can bypass the strict path-matching rules used by Spring Security filters. The attack flow begins with a request bypassing the security filter, allowing it to reach the DispatcherHandler, which then processes the request through the ResourceWebHandler, potentially exposing restricted resources without proper authorization. The vulnerability has received a CVSS v3.1 score of 9.1 (Critical) with a vector string of CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N (Security Online).

Impact

Successful exploitation of this vulnerability could lead to unauthorized access to protected static resources, potentially resulting in the disclosure of sensitive information or modification of data. The vulnerability specifically affects static resources, while non-static resources remain protected through additional path validation mechanisms (Security Online).

Mitigation and workarounds

Users of affected versions should upgrade to their corresponding fixed versions: 5.7.13 (Enterprise Support Only), 5.8.15 (Enterprise Support Only), 6.0.13 (Enterprise Support Only), 6.1.11 (Enterprise Support Only), 6.2.7 (OSS), or 6.3.4 (OSS). The vulnerability was responsibly reported by tkswifty and [email protected] (Spring Security).

Additional resources


SourceThis report was generated using AI

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

“Best User Experience I have ever seen, provides full visibility to cloud workloads.”
David EstlickCISO
“Wiz provides a single pane of glass to see what is going on in our cloud environments.”
Adam FletcherChief Security Officer
“We know that if Wiz identifies something as critical, it actually is.”
Greg PoniatowskiHead of Threat and Vulnerability Management