CVE-2022-22950:
Allocation of Resources Without Limits or Throttling in Spring Framework
6.5
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.88918%
CWE
Published
4/3/2022
Updated
3/28/2023
KEV Status
No
Technology
Java
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
org.springframework:spring-expression | maven | >= 5.3.0, < 5.3.17 | 5.3.17 |
org.springframework:spring-expression | maven | < 5.2.20.RELEASE | 5.2.20.RELEASE |
Vulnerability Intelligence
Miggo AI
Root 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.