Miggo Logo

CVE-2025-22223: Spring Security Vulnerable to Authorization Bypass via Security Annotations

5.3

CVSS Score
3.1

Basic Information

EPSS Score
0.01692%
Published
3/24/2025
Updated
3/24/2025
KEV Status
No
Technology
TechnologyJava

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
org.springframework.security:spring-security-coremaven

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot 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.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

Sprin* S**urity *.*.* - *.*.* m*y not *orr**tly lo**t* m*t*o* s**urity *nnot*tions on p*r*m*t*riz** typ*s or m*t*o*s. T*is m*y **us* *n *ut*oriz*tion *yp*ss.  You *r* not *****t** i* you *r* not usin* @*n**l*M*t*o*S**urity, or you *o not **v* m*t*o*

Reasoning

T** vuln*r**ility st*ms *rom *ow m*t*o* s**urity *nnot*tions w*r* *is*ov*r** in in**rit*n** *i*r*r**i*s. T** pr*-p*t** impl*m*nt*tion in `*in**los*stM*t*o**nnot*tions` us** `**t***l*r**M*t*o*()` w*i** *o*sn't ***ount *or **n*ri* typ* p*r*m*t*rs w**n