CVE-2025-22223: Spring Security Vulnerable to Authorization Bypass via Security Annotations
5.3
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.01692%
CWE
Published
3/24/2025
Updated
3/24/2025
KEV Status
No
Technology
Java
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| org.springframework.security:spring-security-core | maven |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from how method security annotations were discovered in inheritance hierarchies. The pre-patch implementation in findClosestMethodAnnotations used getDeclaredMethod() which doesn't account for generic type parameters when resolving overridden methods. This caused security annotations on parameterized superclass/interface methods to be missed, allowing unauthorized access. The commit introduced a new findMethod() helper with ResolvableType checks to properly handle generics, confirming the original implementation was vulnerable.