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)
| Artifact | Affected versions | Fixed 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
31% of the dependent artifacts (789) still pull an affected version in their latest release.
| Depth | Dependent 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
- org.springframework.boot » spring-boot-starter-security3,606 usages
- org.springframework.security » spring-security-web2,133 usages
- org.springframework.security » spring-security-config2,063 usages
- org.springframework.security » spring-security-test1,308 usages
- org.jenkins-ci.main » jenkins-core1,191 usages
- com.atlassian.jira » jira-core554 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-starter-oauth2-resource-server463 usages
- org.springframework.security » spring-security-ldap457 usages
- org.springframework.boot » spring-boot-starter-oauth2-client446 usages
- org.apereo.cas » cas-server-core-configuration-api442 usages
- org.apereo.cas » cas-server-core-authentication-api400 usages
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.
References
| Advisory | NVD CVE-2025-41248 | nvd.nist.gov |
| Package | spring-projects/spring-security | github.com |
| Web | spring-projects/spring-security issue #17898 | github.com |
| Web | spring-projects/spring-security issue #17899 | github.com |
| Web | spring-projects/spring-security commit d0f93fa | github.com |
| Web | spring-projects/spring-security commit e5694ac | github.com |
| Web | spring-projects/spring-security release 6.4.10 | github.com |
| Web | spring-projects/spring-security release 6.5.4 | github.com |
| Web | security/cve-2025-41248 | spring.io |
