CVE-2025-48924: Commons lang3 Apache Commons Lang Is Vulnerable Vulnerability

MODERATE
Advisory Identifier: GHSA-j288-q9x7-2f5v
CVSS 6.5
CWE-674
Published
Advisory Summary

CVE-2025-48924 is a MODERATE (CVSS 6.5) apache commons lang is vulnerable vulnerability (CWE-674: Uncontrolled Recursion) affecting Commons lang3 libraries in the Maven ecosystem. The issue involves apache commons lang is vulnerable to uncontrolled recursion when processing long inputs. Remediation is available by upgrading affected packages to version 3.18.0.

CVE-2025-48924 at a Glance

CVE Identifier CVE-2025-48924
GHSA Identifier GHSA-j288-q9x7-2f5v
Severity MODERATE
CVSS v3.1 Base Score 6.5
CWE Classification CWE-674: Uncontrolled Recursion
Affected Product Commons lang3
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 6.5

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability None (A:N)

How to Fix CVE-2025-48924

To remediate this vulnerability, upgrade all affected Commons lang3 dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

org.apache.commons:commons-lang3 fixed: 3.18.0
<dependency>
    <groupId>org.apache.commons</groupId>
    <artifactId>commons-lang3</artifactId>
    <version>3.18.0</version>
</dependency>
commons-lang:commons-lang fixed: Latest secure release
<dependency>
    <groupId>commons-lang</groupId>
    <artifactId>commons-lang</artifactId>
    <version>Latest secure release</version>
</dependency>
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

mvn dependency:tree -Dincludes=org.apache.commons

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2025-48924, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=org.apache.commons

Analyze the terminal output to locate any version of Commons lang3 in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 3.18.0), your application is affected.

Note: The mvn dependency:tree -Dincludes=org.apache.commons command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-674: Uncontrolled Recursion, where the product does not properly control the amount of recursion that takes place, consuming excessive resources, such as allocated memory or the program stack. In Commons lang3, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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.

CVE-2025-48924 Affected Commons lang3 Versions

2 component(s)
Fixed Versions:
3.18.0
Product / Package Ecosystem Affected Versions Fixed Version
org.apache.commons:commons-lang3
Maven
≥ 3.0
< 3.18.0
3.18.0
commons-lang:commons-lang
Maven
≥ 2.0
≤ 2.6

References

Frequently Asked Questions

What is CVE-2025-48924?
CVE-2025-48924 is a security vulnerability in Commons lang3 involving Apache Commons Lang is vulnerable to Uncontrolled Recursion when processing long inputs under CWE-674: Uncontrolled Recursion.
Which Commons lang3 versions are affected?
Affected versions include releases prior to 3.18.0 across affected packages: org.apache.commons:commons-lang3, commons-lang:commons-lang.
What version fixes CVE-2025-48924?
Upgrading to 3.18.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is commons-lang3 affected?
Yes, org.apache.commons:commons-lang3 is affected in releases prior to 3.18.0. Upgrade your dependency to 3.18.0 or later.
Is commons-lang affected?
Yes, commons-lang:commons-lang is affected in releases prior to Latest secure release. Upgrade your dependency to Latest secure release or later.
What is the CVSS score of CVE-2025-48924?
CVE-2025-48924 has a CVSS v3.1 base score of 6.5 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N.
What CWE is associated with CVE-2025-48924?
CVE-2025-48924 is classified under CWE-674: Uncontrolled Recursion (The product does not properly control the amount of recursion that takes place, consuming excessive resources, such as allocated memory or the program stack.).
How can I check Maven dependencies for CVE-2025-48924?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.apache.commons'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-j288-q9x7-2f5v",
  "modified" : "2025-11-05T20:30:31Z",
  "published" : "2025-07-11T15:31:37Z",
  "aliases" : [ "CVE-2025-48924" ],
  "summary" : "Apache Commons Lang is vulnerable to Uncontrolled Recursion when processing long inputs",
  "details" : "Uncontrolled Recursion vulnerability in Apache Commons Lang.\n\nThis 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.\n\nThe 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.\n\nUsers are recommended to upgrade to version 3.18.0, which fixes the issue.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.commons:commons-lang3"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "3.0"
      }, {
        "fixed" : "3.18.0"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "commons-lang:commons-lang"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.0"
      }, {
        "last_affected" : "2.6"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-48924"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/apache/commons-lang/commit/b424803abdb2bec818e4fbcb251ce031c22aca53"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/apache/commons-lang"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread/bgv0lpswokgol11tloxnjfzdl7yrc1g1"
  }, {
    "type" : "WEB",
    "url" : "https://lists.debian.org/debian-lts-announce/2025/08/msg00000.html"
  }, {
    "type" : "WEB",
    "url" : "https://lists.debian.org/debian-lts-announce/2025/08/msg00026.html"
  }, {
    "type" : "WEB",
    "url" : "https://lists.debian.org/debian-lts-announce/2025/09/msg00032.html"
  }, {
    "type" : "WEB",
    "url" : "https://lists.debian.org/debian-lts-announce/2025/09/msg00036.html"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2025/07/11/1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-674" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2025-07-12T00:48:03Z",
    "nvd_published_at" : "2025-07-11T15:15:24Z"
  }
}