CVE-2025-41248: Spring Security authorization bypass for method security annotations on parameterized types

Published Sep 16, 2025
·
Updated

The Spring Framework 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 if such annotations are used for authorization decisions.

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-41248

Other sources

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 .

Red Hat

Affected Software

4 affected componentsFixes available
Spring Spring Security
maven/org.springframework.security:spring-security-core>=6.5.0<6.5.4
6.5.4
maven/org.springframework.security:spring-security-core>=6.4.0<6.4.10
6.4.10
IBM API Connect V12 OnPrem<=All

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade maven/org.springframework.security:spring-security-core to a version that resolves this vulnerability.

    Fixed in 6.5.4
  2. Upgrade

    Upgrade maven/org.springframework.security:spring-security-core to a version that resolves this vulnerability.

    Fixed in 6.4.10
  3. Configuration

    If not required, do not enable Spring Security method security (@EnableMethodSecurity), since applications using it may be affected.

    Spring Security @EnableMethodSecurity = disable / do not use
  4. Configuration

    If you use @EnableMethodSecurity, avoid using @PreAuthorize and other method security annotations on methods declared within generic superclasses or generic interfaces with unbounded generics (parameterized super types), as annotation resolution may fail and enable authorization bypass.

    Spring Security method security annotations method security annotations on methods in generic superclasses or generic interfaces = avoid / refactor

Event History

Sep 16, 2025
CVE Published
via MITRE·10:10 AM
Data Sourced
via MITRE·10:10 AM
DescriptionSeverity
Data Sourced
via Red Hat·11:01 AM
DescriptionSeverityAffected Software
Data Sourced
via NVD·11:15 AM
DescriptionSeverityWeakness
Advisory Published
via GitHub·03:32 PM
Data Sourced
via GitHub·03:32 PM
DescriptionSeverityWeaknessAffected Software
Jul 7, 2026
Data Sourced
via IBM·12:00 AM
DescriptionAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2025-41248?

CVE-2025-41248 is classified as a vulnerability that could lead to authorization issues in Spring Security.

2

How do I fix CVE-2025-41248?

To mitigate CVE-2025-41248, ensure you are using the latest version of Spring Security that addresses this annotation detection issue.

3

What are the potential impacts of CVE-2025-41248?

The potential impact of CVE-2025-41248 includes improper access control due to mismanaged method security annotations.

4

Which versions of Spring Security are affected by CVE-2025-41248?

CVE-2025-41248 affects various versions of Spring Security that utilize the annotation detection mechanism.

5

What is the cause of CVE-2025-41248?

CVE-2025-41248 is caused by the Spring Security framework's failure to correctly resolve annotations in methods with parameterized super types and unbounded generics.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203