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.