Miggo Logo

CVE-2022-22950:
Allocation of Resources Without Limits or Throttling in Spring Framework

6.5

CVSS Score
3.1

Basic Information

EPSS Score
0.88918%
Published
4/3/2022
Updated
3/28/2023
KEV Status
No
Technology
TechnologyJava

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Package NameEcosystemVulnerable VersionsFirst Patched Version
org.springframework:spring-expressionmaven>= 5.3.0, < 5.3.175.3.17
org.springframework:spring-expressionmaven< 5.2.20.RELEASE5.2.20.RELEASE

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from missing array size validation in SpEL's array creation logic. The patch introduced a MAX_ARRAY_ELEMENTS threshold (256K elements) and added checkNumElements() validation in createArray(). The vulnerable versions lacked these checks, allowing attackers to specify arbitrary array sizes in SpEL expressions. The commit diff shows critical additions: 1) MAX_ARRAY_ELEMENTS constant, 2) checkNumElements() calls during array size calculation, and 3) proper error handling via SpelMessage.MAX_ARRAY_ELEMENTS_THRESHOLD_EXCEEDED. The createArray method is directly responsible for processing array constructors in SpEL expressions, making it the clear entry point for this resource exhaustion vulnerability.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

In Sprin* *r*m*work v*rsions *.*.* - *.*.**, *.*.*.R*L**S* - *.*.**.R*L**S*, *n* ol**r unsupport** v*rsions, it is possi*l* *or * us*r to provi** * sp**i*lly *r**t** Sp*L *xpr*ssion t**t m*y **us* * **ni*l o* s*rvi** *on*ition.

Reasoning

T** vuln*r**ility st*ms *rom missin* *rr*y siz* v*li**tion in Sp*L's *rr*y *r**tion lo*i*. T** p*t** intro*u*** * M*X_*RR*Y_*L*M*NTS t*r*s*ol* (***K *l*m*nts) *n* ***** ****kNum*l*m*nts() v*li**tion in *r**t**rr*y(). T** vuln*r**l* v*rsions l**k** t*