Skip to main content

CVE-2025-48924: CWE-674 Uncontrolled Recursion in Apache Software Foundation Apache Commons Lang

Medium
VulnerabilityCVE-2025-48924cvecve-2025-48924cwe-674
Published: Fri Jul 11 2025 (07/11/2025, 14:56:58 UTC)
Source: CVE Database V5
Vendor/Project: Apache Software Foundation
Product: Apache Commons Lang

Description

Uncontrolled Recursion vulnerability in Apache Commons Lang. This issue affects Apache Commons Lang: Starting with commons-lang:commons-lang 2.0 to 2.6, and, from org.apache.commons:commons-lang3 3.0 before 3.18.0. The methods ClassUtils.getClass(...) can throw StackOverflowError on very long inputs. Because an Error is usually not handled by applications and libraries, a StackOverflowError could cause an application to stop. Users are recommended to upgrade to version 3.18.0, which fixes the issue.

AI-Powered Analysis

AILast updated: 07/11/2025, 15:16:56 UTC

Technical Analysis

CVE-2025-48924 is a vulnerability classified under CWE-674 (Uncontrolled Recursion) affecting the Apache Commons Lang library, a widely used Java utility library maintained by the Apache Software Foundation. The vulnerability specifically impacts versions from commons-lang 2.0 through 2.6 and commons-lang3 versions 3.0 up to but not including 3.18.0. The root cause lies in the ClassUtils.getClass(...) methods, which can enter uncontrolled recursion when processing very long input strings. This recursion leads to a StackOverflowError, a type of Java Error that is typically not caught or handled by applications or dependent libraries. Consequently, the occurrence of this error can cause the hosting application to abruptly terminate or crash, resulting in a denial of service (DoS) condition. Since the error is triggered by input length, an attacker could craft malicious inputs to exploit this flaw and disrupt service availability. The vulnerability does not appear to have known exploits in the wild at this time, and no CVSS score has been assigned yet. The recommended remediation is to upgrade to Apache Commons Lang version 3.18.0 or later, where this issue has been addressed. This vulnerability is particularly relevant for Java applications that rely on the affected versions of Apache Commons Lang, especially those that process untrusted or user-supplied input through ClassUtils.getClass(...) methods.

Potential Impact

For European organizations, the primary impact of CVE-2025-48924 is the potential for denial of service due to application crashes triggered by StackOverflowError. This can disrupt critical business applications, leading to downtime, loss of productivity, and potential financial losses. Organizations in sectors such as finance, healthcare, telecommunications, and government, which often rely on Java-based enterprise applications, may experience service interruptions if their software stack includes vulnerable versions of Apache Commons Lang. Additionally, if the affected applications are part of customer-facing services or critical infrastructure, the availability impact could extend to end users and partners, damaging reputation and trust. While the vulnerability does not directly lead to data breaches or code execution, the resulting instability can be leveraged as part of a broader attack strategy, such as timed DoS attacks during peak business hours. The lack of known exploits suggests a window of opportunity for proactive mitigation before widespread exploitation occurs.

Mitigation Recommendations

To mitigate this vulnerability, European organizations should: 1) Conduct an inventory of all Java applications and services to identify usage of Apache Commons Lang versions 2.0 through 2.6 and 3.0 up to 3.17.x. 2) Prioritize upgrading all affected instances to version 3.18.0 or later, which contains the fix for uncontrolled recursion in ClassUtils.getClass(...). 3) If immediate upgrade is not feasible, implement input validation and length checks on data passed to ClassUtils.getClass(...) to prevent excessively long inputs that could trigger recursion. 4) Employ runtime monitoring and alerting for unexpected StackOverflowError occurrences to detect potential exploitation attempts. 5) Review application error handling to ensure that critical errors do not cause complete application failure and consider implementing fallback or graceful degradation mechanisms. 6) Engage with software vendors or development teams to ensure patched versions are deployed in a timely manner. 7) Incorporate this vulnerability into ongoing vulnerability management and patching cycles to prevent reintroduction.

Need more detailed analysis?Get Pro

Technical Details

Data Version
5.1
Assigner Short Name
apache
Date Reserved
2025-05-28T15:06:51.476Z
Cvss Version
null
State
PUBLISHED

Threat ID: 68712732a83201eaacaf3f8f

Added to database: 7/11/2025, 3:01:06 PM

Last enriched: 7/11/2025, 3:16:56 PM

Last updated: 7/11/2025, 8:16:05 PM

Views: 5

Actions

PRO

Updates to AI analysis are available only with a Pro account. Contact root@offseq.com for access.

Please log in to the Console to use AI analysis features.

Need enhanced features?

Contact root@offseq.com for Pro access with improved analysis and higher rate limits.

Latest Threats