CVE-2022-31692: Spring Security authorization rules can be bypassed via forward or include dispatcher types
9.8
Basic Information
Technical Details
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| org.springframework.security:spring-security-core | maven | >= 5.7.0, < 5.7.5 | 5.7.5 |
| org.springframework.security:spring-security-core | maven | >= 5.6.0, < 5.6.9 | 5.6.9 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from the interaction between AuthorizationFilter's request-processing logic and dispatcher-type configuration. The doFilterInternal method in AuthorizationFilter is designed to apply security checks but skips re-authorization on FORWARD/INCLUDE dispatchers when observeOncePerRequest=true. The shouldFilterAllDispatcherTypes() configuration method creates a vulnerable state by enabling filtering for all dispatcher types without properly handling re-authorization in forwarded requests. These functions are explicitly referenced in the vulnerability's preconditions (use of AuthorizationFilter via authorizeHttpRequests() and configuration of dispatcher types), and the mitigation involves modifying their behavior (disabling observeOncePerRequest).