Incorrect Authorization Affecting org.springframework.security:spring-security-core package, versions [6.4.0,6.4.4)


Severity

Recommended
0.0
medium
0
10

CVSS assessment made by Snyk's Security Team. Learn more

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Incorrect Authorization vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-JAVA-ORGSPRINGFRAMEWORKSECURITY-9486466
  • published20 Mar 2025
  • disclosed19 Mar 2025
  • creditVasil Ilchev, Neale Upstone

Introduced: 19 Mar 2025

NewCVE-2025-22223  (opens in a new tab)
CWE-863  (opens in a new tab)

How to fix?

Upgrade org.springframework.security:spring-security-core to version 6.4.4 or higher.

Overview

org.springframework.security:spring-security-core is a package that provides security services for the Spring IO Platform.

Affected versions of this package are vulnerable to Incorrect Authorization when using @EnableMethodSecurity on parameterized types or methods. The method annotation finding logic in findClosestMethodAnnotations() does not properly traverse the inheritance of method security annotations, allowing authorization bypass if a method security annotation is used on a parameterized superclass, interface, or overridden method but not on the target method.

If any of the following are true the application is not vulnerable:

  1. Method security annotations (@EnableMethodSecurity) are not in use.

  2. Method security annotations are in use but not for parameterized types or methods.

  3. All method security annotations are attached to target methods.

CVSS Base Scores

version 4.0
version 3.1