Miggo Logo

CVE-2025-48924:
Apache Commons Lang is vulnerable to Uncontrolled Recursion when processing long inputs

6.5

CVSS Score
3.1

Basic Information

EPSS Score
0.0587%
Published
7/11/2025
Updated
7/12/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:L/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
org.apache.commons:commons-lang3maven>= 3.0, < 3.18.03.18.0
commons-lang:commons-langmaven>= 2.0, <= 2.6

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The analysis of the provided commit patch directly points to the org.apache.commons.lang3.ClassUtils.getClass method as the source of the uncontrolled recursion vulnerability. The patch explicitly removes the recursive call within the method and replaces it with an iterative do-while loop. The commit message, "Rewrite ClassUtils.getClass() without recursion to avoid StackOverflowError on very long inputs," further confirms this. The vulnerability is triggered when a long string containing numerous package separators is passed to the method, leading to excessive recursive calls that exhaust the call stack and result in a StackOverflowError, which can cause a denial of service.

Vulnerable functions

org.apache.commons.lang3.ClassUtils.getClass
src/main/java/org/apache/commons/lang3/ClassUtils.java
The vulnerability lies in the recursive nature of the `getClass` method. When a class name with many package separators ('.') is provided, the method recursively calls itself after replacing the last separator with an inner class separator ('$'). This can lead to a `StackOverflowError` for very long, specially crafted class names, causing the application to terminate.

WAF Protection Rules

WAF Rule

Un*ontroll** R**ursion vuln*r**ility in *p**** *ommons L*n*. T*is issu* *****ts *p**** *ommons L*n*: St*rtin* wit* *ommons-l*n*:*ommons-l*n* *.* to *.*, *n*, *rom or*.*p****.*ommons:*ommons-l*n** *.* ***or* *.**.*. T** m*t*o*s *l*ssUtils.**t*l*ss(.

Reasoning

T** *n*lysis o* t** provi*** *ommit p*t** *ir**tly points to t** `or*.*p****.*ommons.l*n**.*l*ssUtils.**t*l*ss` m*t*o* *s t** sour** o* t** un*ontroll** r**ursion vuln*r**ility. T** p*t** *xpli*itly r*mov*s t** r**ursiv* **ll wit*in t** m*t*o* *n* r*