Medium

Apache Commons Lang is vulnerable to Uncontrolled Recursion when processing long inputs

  • Disclosed: 11.07.2025
  • Updated: 11.10.2026 13:20

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.

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
Java / Kotlin (Maven) commons-lang:commons-lang >= 2.0, <= 2.6 no fix
Java / Kotlin (Maven) org.apache.commons:commons-lang3 >= 3.0, < 3.18.0 3.18.0

References

CVSS score 6.5/10
CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N
Weakness (CWE)
CWE-674
Platform
Java / Kotlin (Maven)
Package
commons-lang:commons-lang, org.apache.commons:commons-lang3
Disclosed
11.07.2025
Updated
11.10.2026 13:20

Sources and licenses

OSV / GitHub Advisory Database - GHSA-j288-q9x7-2f5v - CC BY 4.0

Vulnerability history: org.apache.commons:commons-lang3

All published vulnerabilities of this package (Java / Kotlin (Maven)), newest first. Shows whether this is a one-off slip or a package that needs watching.

This is the only known vulnerability of this package.

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.