CVE-2026-59333
Spring Security IP Address CIDR Matching Ignores Address Family
Description
Spring Security's IP address matching support, including IpAddressMatcher, IpAddressServerWebExchangeMatcher, and the InetAddressMatchers factory introduced in 7.1, matches a remote address against a configured IP address or CIDR range.
When comparing addresses, the matcher compared only the leading bytes of the remote and configured addresses without first confirming that the two addresses belong to the same address family. Because IPv4 and IPv6 addresses have different byte lengths, a remote address in one family whose leading bytes happened to coincide with a configured CIDR range in the other family could be reported as a match even though the families differ.
Preconditions:
The application uses IpAddressMatcher, IpAddressServerWebExchangeMatcher, or InetAddressMatchers (for example via hasIpAddress(), an internal/external network check, or an include/exclude address list) to restrict access based on the remote IP address, and the application's network stack can present a remote address in an address family other than the one used in the matcher's configured address or CIDR range (for example through IPv4-mapped IPv6 addresses, a dual-stack listener, or a proxy that translates between families).
An attacker connecting from an address family the application administrator did not intend to permit may be able to satisfy an IP-based access-control rule and bypass the restriction.
Affected Maven artifacts (1)
| Artifact | Affected versions | Fixed in |
|---|---|---|
| org.springframework.security » spring-security-core | >= 7.1.0, < 7.1.3 | 7.1.3 |
Blast radius
66% of the dependent artifacts (1,694) still pull an affected version in their latest release.
| Depth | Dependent versions |
|---|---|
| Direct | 5,762 |
| 2 hops | 23,696 |
| 3 hops | 17,619 |
| 4 hops | 6,677 |
| 5 hops | 8,292 |
| 6 hops | 2,558 |
Most used dependents
- org.springframework.boot » spring-boot-starter-security3,609 usages
- org.springframework.security » spring-security-web2,136 usages
- org.springframework.security » spring-security-config2,066 usages
- org.springframework.security » spring-security-test1,310 usages
- org.jenkins-ci.main » jenkins-core1,191 usages
- org.springframework.security » spring-security-cas550 usages
- org.springframework.security » spring-security-oauth2-jose508 usages
- org.apereo.cas » cas-server-core-util-api492 usages
- org.springframework.security » spring-security-oauth2-client481 usages
- org.springframework.boot » spring-boot-security479 usages
- org.springframework.boot » spring-boot-starter-oauth2-resource-server465 usages
- org.springframework.security » spring-security-ldap457 usages
- org.xwiki.platform » xwiki-platform-oldcore449 usages
- org.springframework.boot » spring-boot-starter-oauth2-client447 usages
- org.apereo.cas » cas-server-core-configuration-api442 usages
Computed from the dependency graph of build 20261125.0317 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.
