The vulnerability is a path traversal issue in Spring Framework's MVC module, specifically when handling static resources on non-compliant servlet containers. The root cause is improper handling of URI-encoded path segments.
My analysis began by identifying the patched version, 6.2.10, and comparing it against the last known vulnerable version, 6.2.9, to find the security fix. Among the commits between these versions, one stood out: "Refine StringUtils#uriDecode and update documentation" (24e66b63d1d12c45e4af333d6271451083f81e90).
This commit significantly refactors the uriDecode method in org.springframework.util.StringUtils. The previous implementation was complex and handled percent-encoding in a way that could be bypassed with specially crafted input. The new implementation is more robust and uses modern Java APIs for hexadecimal decoding, which is less prone to errors.
The vulnerability manifests when a component like ResourceHttpRequestHandler (responsible for serving static resources) uses this decoding function to process a request's path. On a non-compliant servlet container, malicious input like /%252e%252e/ (double-encoded ../) might be passed to the application. The flawed uriDecode function could improperly decode this sequence, leading to a path traversal attack.
Therefore, org.springframework.util.StringUtils.uriDecode is identified as the core vulnerable function because it contains the flawed logic that processes the malicious input. org.springframework.web.util.UriUtils.decode is also identified as it is a direct public wrapper in the spring-web module, making it a likely candidate to appear in a runtime profile during exploitation.