CVE-2024-22243:
Spring Web vulnerable to Open Redirect or Server Side Request Forgery
8.1
Basic Information
Technical Details
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
org.springframework:spring-web | maven | >= 6.1.0, < 6.1.4 | 6.1.4 |
org.springframework:spring-web | maven | >= 6.0.0, < 6.0.17 | 6.0.17 |
org.springframework:spring-web | maven | >= 5.3.0, < 5.3.32 | 5.3.32 |
org.springframework:spring-web | maven | <= 5.2.25.RELEASE |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability lies in the parsing of URLs within UriComponentsBuilder
, specifically related to the USERINFO_PATTERN
. The provided patch updates this regex. Therefore, public methods of UriComponentsBuilder
that accept string URLs (like fromUriString
, fromHttpUrl
) and trigger the parsing logic are the primary vulnerable functions. The build()
method, which finalizes the URI, and any internal parsing methods (like a hypothetical parseUriString
) that use the pattern are also relevant as they are part of the vulnerable code execution path. The change in the regex from ([^@\\[/?#]*)
to ([^@/?#]*)
indicates that the previous pattern allowed characters that could be exploited to bypass host validation by manipulating the userinfo part of the URL.