HIGH

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)

ArtifactAffected versionsFixed in
org.springframework.security » spring-security-core
>= 7.1.0, < 7.1.3
7.1.3

Blast radius

1affected artifacts
3affected versions
2,562dependent artifacts (est.)
64,604dependent versions

66% of the dependent artifacts (1,694) still pull an affected version in their latest release.

DepthDependent 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

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.