Uncontrolled Recursion Vulnerability in Apache Commons Lang: libcommons-lang-java and libcommons-lang3-java

libcommons-lang-java Updated 03 Oct 2025

Summary

11/07/2025
N/A
No i
Medium
5.3

UBUNTU-CVE-2025-48924: Uncontrolled Recursion vulnerability in Apache Commons Lang. Affects libcommons-lang-java versions 2.6-3ubuntu2. No fix is published. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

Apache Commons Lang is a widely used library that provides utility methods for Java programming, enhancing the standard Java API. The library includes classes for manipulating core Java classes, such as String, Date, and Class. The vulnerability in question affects versions of the library from 2.0 to 2.6 for commons-lang and from 3.0 to before 3.18.0 for commons-lang3, making it susceptible to uncontrolled recursion issues.

Vulnerability Detail

The vulnerability arises from the methods ClassUtils.getClass(...) in Apache Commons Lang, which can throw a StackOverflowError when processing very long inputs. This uncontrolled recursion can lead to application crashes, as the StackOverflowError is typically not handled by applications or libraries. The issue affects versions of commons-lang from 2.0 to 2.6 and commons-lang3 from 3.0 to 3.18.0, potentially causing significant disruptions in applications relying on these libraries.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

As a temporary workaround, users can implement input validation to limit the length of inputs passed to the ClassUtils.getClass(...) method, thereby preventing the StackOverflowError from occurring.

Conclusion

The uncontrolled recursion vulnerability in Apache Commons Lang affects multiple versions of libcommons-lang-java and libcommons-lang3-java. Users are strongly advised to upgrade to the patched versions to avoid potential application crashes and ensure stability. Implementing input validation can serve as a temporary measure until the upgrade is completed.

See every vulnerability recorded for libcommons-lang-java →

Share this vulnerability

FAQ

The CVSS score of this vulnerability is 5.3, indicating a medium severity level.

Affected versions include commons-lang from 2.0 to 2.6 and commons-lang3 from 3.0 to before 3.18.0.

If left unaddressed, the vulnerability can lead to application crashes due to StackOverflowError, disrupting service and user experience.

You can use Vulert, which monitors and alerts for open-source vulnerabilities in real-time. Visit Vulert Scanner to check your application without signup.

Yes, implementing input validation to restrict the length of inputs to the ClassUtils.getClass(...) method can serve as a temporary workaround.

Related vulnerabilities

Recent vulnerabilities recorded for libcommons-lang-java.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback