HIGH 7.5

CVE-2025-41248

Spring Security annotation detection mechanism has authorization bypass

Description

The Spring Security annotation detection mechanism may not correctly resolve annotations on methods within type hierarchies with a parameterized super type with unbounded generics. This can be an issue when using @PreAuthorize and other method security annotations, resulting in an authorization bypass.

Your application may be affected by this if you are using Spring Security's @EnableMethodSecurity feature.

You are not affected by this if you are not using @EnableMethodSecurity or if you do not use security annotations on methods in generic superclasses or generic interfaces.

This CVE is published in conjunction with CVE-2025-41249 https://spring.io/security/cve-2025-41249 .

Affected Maven artifacts (1)

ArtifactAffected versionsFixed in
org.springframework.security » spring-security-core
>= 6.4.0, < 6.4.10>= 6.5.0, < 6.5.4
6.4.10, 6.5.4

Blast radius

1affected artifacts
14affected versions
2,513dependent artifacts (est.)
85,291dependent versions

31% of the dependent artifacts (789) still pull an affected version in their latest release.

DepthDependent versions
Direct
11,529
2 hops
43,378
3 hops
12,156
4 hops
12,672
5 hops
4,977
6 hops
579

Most used dependents

Computed from the dependency graph of build 20261124.0621 (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.