Spring Framework URL Parsing with Host Validation Vulnerability
Date: 2024-03
Affected: maven/org.springframework:spring-web, maven/org.springframework:spring-web, maven/org.springframework:spring-web
Attack vector: ssrf
Category: vulnerability-disclosure
Severity: High
CVE: CVE-2024-22259
CWE: CWE-601
CVSS: 8.1 (CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:N)

Applications that use UriComponentsBuilder in Spring Framework to parse an externally provided URL (e.g. through a query parameter) AND perform validation checks on the host of the parsed URL may be vulnerable to a open redirect https://cwe.mitre.org/data/definitions/601.html attack or to a SSRF attack if the URL is used after passing validation checks. This is the same as CVE-2024-22243 https://spring.io/security/cve-2024-22243, but with different input.


Mitigations:

Architectural layers (MAESTRO):