Description

A cybersecurity researcher has published technical details and a proof-of-concept (PoC) exploit for CVE-2024-38821, a high-severity vulnerability rated at CVSS 9.1, affecting certain versions of Spring WebFlux. This flaw allows attackers to gain access to restricted resources by exploiting the way Spring WebFlux handles static resources. Researcher Mouad Kondah explains that attackers can bypass security filters by manipulating URL paths changing a path from `/index.html` to `//index.html`, for example which evades Spring Security’s strict path-matching mechanism. This vulnerability could potentially expose sensitive information in applications that rely on Spring’s WebFlux module. The issue is particularly concerning for applications serving static resources under non-permitAll authorization rules, especially those using Spring's ResourceWebHandler for files like images, HTML, and YAML. The vulnerability stems from insufficiently implemented security filters that fail to block unauthorized requests when URL manipulation is used. By sending a crafted request, an attacker can bypass security filters, reach the DispatcherHandler, and access restricted resources if all filters are successfully evaded. Only static resources are affected, as non-static resources enforce more stringent path validation and return a 400 NOT FOUND error when paths are manipulated. Spring has recommended that users upgrade to secure versions to mitigate this vulnerability. The affected versions include 5.7.13, 5.8.15, 6.0.13, 6.1.11, 6.2.7, and 6.3.4, with some patches available only through Enterprise Support. Kondah has shared the PoC exploit on his GitHub repository, urging affected users to update promptly to prevent potential exploitation.