Cloudanix VulnDB

CVE-2025-48924

Medium · 6.5

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

CVSS

6.5

EPSS

2.6%

Published

Jul 11, 2025

CISA due date

—

Cloudanix analysis

Next patch cycle SSVC: Track

A common software component can be crashed by unusually long input, potentially making affected applications unavailable until they are updated.

Exploitation
Remote Unauthenticated
Attacker needs
None
Complexity
Low
Impact
Denial Of Service
Component
Library
Class
Denial of service
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

Apache Commons Lang contains an uncontrolled recursion flaw in ClassUtils.getClass(...). When supplied with very long or deeply nested class-name inputs, affected versions can recurse until the JVM throws java.lang.StackOverflowError. Because StackOverflowError is an Error rather than a normal application exception, many applications do not catch or recover from it, which can terminate the request thread, destabilize the application, or stop the process depending on runtime behavior and error handling. Affected ranges include commons-lang:commons-lang 2.0 through 2.6 and org.apache.commons:commons-lang3 3.0 before 3.18.0. The supplied package data also indicates Debian 12 Chromium packages are fixed in 138.0.7204.157-1~deb12u1.

Why it matters to the business

Successful exploitation can cause service crashes or degraded availability in applications that pass attacker-controlled class-name strings to Apache Commons Lang ClassUtils.getClass(...). The primary risk is denial of service rather than data theft or code execution. The CVSS score is medium and EPSS is low, with no known CISA KEV listing or ransomware association, so remediation should be prioritized based on whether exposed services accept untrusted input that reaches this library. Because Commons Lang is widely used as a transitive Java dependency, exposure may exist even when the library is not directly referenced by application code.

How an attack unfolds

An attacker first identifies an application path that accepts text input and eventually resolves it as a Java class name using Apache Commons Lang ClassUtils.getClass(...), directly or through a framework, plugin, expression feature, deserialization-adjacent workflow, configuration endpoint, or validation routine. The attacker then submits an unusually long or deeply structured class-name value designed to trigger excessive recursive parsing. In vulnerable versions, the recursion exhausts the JVM stack and raises java.lang.StackOverflowError. If the application does not isolate or handle this condition, the affected request handler may fail, the application may log repeated fatal errors, health checks may fail, or the JVM/container may restart, resulting in denial of service. There is no public evidence in the provided data of mature exploitation, KEV activity, named threat actor use, or ransomware use.

How to fix it

Upgrade org.apache.commons:commons-lang3 to version 3.18.0 or later. For legacy commons-lang:commons-lang 2.x deployments, migrate away from the unsupported 2.x line to commons-lang3 3.18.0 or later where feasible, and test any API differences before production rollout. Update dependency locks, Maven/Gradle/Bazel/SBT build files, shaded JARs, application server shared libraries, and container images so vulnerable copies are removed rather than merely overridden. If using Debian 12 Chromium packages from the supplied product data, update chromium to 138.0.7204.157-1~deb12u1 or later. Where immediate upgrade is not possible, reduce exposure by rejecting excessively long class/type-name inputs, enforcing strict allowlists for class names, limiting request body and parameter sizes, isolating risky parsing paths, and ensuring process supervisors restart failed services safely.

How to confirm the fix worked

Confirm dependency resolution shows org.apache.commons:commons-lang3 version 3.18.0 or later and no commons-lang:commons-lang 2.0-2.6 copies remain in runtime classpaths, shaded artifacts, fat JARs, application server library directories, or container layers. Use software composition analysis, mvn dependency:tree, gradle dependencies, SBOM comparison, jar inspection, and runtime classpath inspection to verify the effective version. For Debian 12 Chromium, confirm the installed package version is 138.0.7204.157-1~deb12u1 or later using package inventory tooling. Regression test application features that resolve class/type names and verify they reject oversized or malformed values without raising java.lang.StackOverflowError. Review production logs after deployment to ensure prior StackOverflowError events no longer occur in paths referencing Apache Commons Lang ClassUtils.

Typical attack path

  1. Discover a remotely reachable feature or API that accepts class names, type names, object paths, expressions, plugin identifiers, or configuration-like input.
  2. Determine or infer that the backend uses Apache Commons Lang ClassUtils.getClass(...) on attacker-controlled input.
  3. Send a very long or deeply nested class-name string intended to force uncontrolled recursion.
  4. Trigger java.lang.StackOverflowError in the vulnerable library.
  5. Cause request failure, thread death, application instability, process termination, or repeated restarts depending on JVM and container behavior.
  6. Repeat requests to sustain a denial-of-service condition.

How to detect it

To determine whether exploitation already occurred, review application logs, JVM logs, container logs, web access logs, reverse proxy logs, APM traces, crash reports, and orchestration events for StackOverflowError events correlated with inbound requests containing unusually long parameters, paths, headers, JSON fields, form values, or configuration/type-name inputs. Focus on stack traces that include org.apache.commons.lang3.ClassUtils.getClass or org.apache.commons.lang.ClassUtils.getClass. Look for sudden increases in HTTP 500 responses, request timeouts, pod/container restarts, JVM exits, OOM/crash-loop-like symptoms without memory exhaustion, failed liveness/readiness probes, and repeated requests from the same source immediately before application instability. Since exploitation causes denial of service rather than a persistent implant, indicators are primarily transient logs and crash artifacts rather than files, registry keys, or malware processes.

  • java.lang.StackOverflowError
  • org.apache.commons.lang3.ClassUtils.getClass
  • org.apache.commons.lang.ClassUtils.getClass
  • ClassUtils.getClass
  • commons-lang3-3.17
  • commons-lang3-3.16
  • commons-lang3-3.15
  • commons-lang3-3.14
  • commons-lang3-3.13
  • commons-lang3-3.12
  • commons-lang-2.6
  • commons-lang-2.5
  • CrashLoopBackOff
  • Liveness probe failed
  • Readiness probe failed
  • HTTP 500
  • StackOverflowError: null

What your security team should do

  • Inventory all Java applications, services, containers, and third-party products for commons-lang:commons-lang 2.0-2.6 and org.apache.commons:commons-lang3 versions before 3.18.0.
  • Prioritize internet-facing or unauthenticated services that process user-supplied type names, class names, expressions, plugin identifiers, or configuration values.
  • Upgrade commons-lang3 to 3.18.0 or later and remove legacy commons-lang 2.x where possible.
  • Check for shaded or bundled vulnerable library copies inside executable JARs, vendor packages, and container images, not only declared build dependencies.
  • Update Debian 12 Chromium packages to 138.0.7204.157-1~deb12u1 or later where applicable.
  • Add input length limits and allowlists around any feature that resolves Java class names from user-controlled data.
  • Create detections for java.lang.StackOverflowError events involving org.apache.commons.lang.ClassUtils or org.apache.commons.lang3.ClassUtils.
  • Review historical logs for repeated StackOverflowError crashes, restart loops, health-check failures, or bursts of oversized requests since publication.
  • Because EPSS is low and there is no KEV listing, treat this as a medium-priority availability issue unless exposure is internet-facing or business-critical.

The record

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 packages

Ecosystem Package Introduced Fixed
Maven commons-lang:commons-lang 2.0 No fix
Maven org.apache.commons:commons-lang3 3.0 3.18.0
Chainguard airflow-2 0 2.11.0-r15
Chainguard airflow-2-compat 0 2.11.0-r15
Chainguard airflow-2-iamguarded-compat 0 2.11.0-r15
Chainguard airflow-3-compat 0 3.1.2-r0
Chainguard airflow-3-iamguarded-compat 0 3.1.2-r0
Chainguard akhq 0 0.26.0-r0
Chainguard apache-activemq-artemis 0 2.42.0-r1
Chainguard apache-activemq-artemis-compat 0 2.42.0-r1
Chainguard apache-nifi 0 2.7.1-r0
Chainguard apache-nifi-compat 0 2.6.0-r2
Chainguard apache-nifi-registry 0 2.4.0-r4
Chainguard apache-nifi-registry-toolkit 0 2.4.0-r4
Chainguard apache-nifi-toolkit 0 2.6.0-r2
Chainguard apache-pulsar 0 4.1.1-r2
Chainguard apache-pulsar-compat 0 4.1.1-r2
Chainguard apache-tika-2.9 0 2.9.4-r1
Chainguard apache-tika-2.9-compat 0 2.9.4-r1
Chainguard apache-tika-3.0 0 3.0.0-r14
Chainguard apache-tika-3.0-compat 0 3.0.0-r14
Chainguard apache-tika-3.1 0 3.1.0-r5
Chainguard apache-tika-3.1-compat 0 3.1.0-r5
Chainguard apache-tika-3.2 0 3.2.1-r1
Chainguard apache-tika-3.2-compat 0 3.2.1-r1
Chainguard apicurio-registry 0 3.0.9-r5
Chainguard apicurio-registry-nginx-config 0 3.0.9-r5
Chainguard apicurio-registry-ui 0 3.0.9-r5
Chainguard camunda-zeebe-8.3 0 8.3.22-r2
Chainguard camunda-zeebe-8.3-compat 0 8.3.22-r2
Chainguard camunda-zeebe-8.4 0 8.4.21-r1
Chainguard camunda-zeebe-8.4-compat 0 8.4.21-r1
Chainguard camunda-zeebe-8.6 0 8.6.21-r1
Chainguard camunda-zeebe-8.6-compat 0 8.6.21-r1
Chainguard camunda-zeebe-8.7 0 8.7.7-r1
Chainguard camunda-zeebe-8.7-compat 0 8.7.7-r1
Chainguard cassandra-4.0 0 4.0.18-r2
Chainguard cassandra-4.0-compat 0 4.0.18-r2
Chainguard cassandra-4.0-iamguarded-compat 0 4.0.18-r2
Chainguard cassandra-4.1 0 4.1.9-r2
Chainguard cassandra-4.1-compat 0 4.1.9-r2
Chainguard cassandra-4.1-iamguarded-compat 0 4.1.9-r2
Chainguard cassandra-5.0 0 5.0.4-r1
Chainguard cassandra-5.0-compat 0 5.0.4-r1
Chainguard cassandra-5.0-entrypoint-compat 0 5.0.4-r1
Chainguard cassandra-5.0-iamguarded-compat 0 5.0.4-r1
Chainguard cassandra-fips-4.0 0 4.0.15-r3
Chainguard cassandra-fips-4.0-compat 0 4.0.15-r3
Chainguard cassandra-fips-4.1 0 4.1.7-r3
Chainguard cassandra-fips-4.1-compat 0 4.1.7-r3
Chainguard cassandra-fips-5.0 0 5.0.3-r6
Chainguard cassandra-fips-5.0-compat 0 5.0.3-r6
Chainguard cassandra-reaper 0 3.8.0-r7
Chainguard celeborn-0.5 0 0.5.4-r11
Chainguard celeborn-0.5-compat 0 0.5.4-r9
Chainguard celeborn-0.6 0 0.6.2-r0
Chainguard celeborn-0.6-compat 0 0.6.1-r0
Chainguard confluent-kafka 0 8.2.0.25-r0
Chainguard confluent-kafka-jre-bcfips 0 8.2.0.41-r0
Chainguard cqlsh-5.0 0 5.0.4-r1
Chainguard cqlsh-fips-5.0 0 5.0.3-r6
Chainguard debezium-connector-spanner-3.0 0 3.0.8-r7
Chainguard dependency-track 0 4.13.2-r2
Chainguard dependency-track-bundled 0 4.13.2-r2
Chainguard druid-compat 0 34.0.0-r6
Chainguard elasticsearch-8 0 8.18.3-r1
Chainguard elasticsearch-8 0 8.19.2-r3
Chainguard elasticsearch-8-bitnami 0 8.18.3-r1
Chainguard elasticsearch-8-bitnami 0 8.19.2-r3
Chainguard elasticsearch-8-config 0 8.18.3-r1
Chainguard elasticsearch-8-config 0 8.19.2-r3
Chainguard elasticsearch-8-iamguarded 0 8.18.3-r1
Chainguard elasticsearch-8-iamguarded 0 8.19.2-r3
Chainguard elasticsearch-8.17 0 8.17.10-r13
Chainguard elasticsearch-8.17-bitnami 0 8.17.10-r12
Chainguard elasticsearch-8.17-config 0 8.17.10-r13
Chainguard elasticsearch-9.0 0 9.0.7-r1
Chainguard elasticsearch-9.0-bitnami 0 9.0.7-r1
Chainguard elasticsearch-9.0-config 0 9.0.7-r1
Chainguard elasticsearch-9.0-iamguarded 0 9.0.7-r1
Chainguard elasticsearch-9.1 0 9.1.6-r0
Chainguard elasticsearch-9.1-bitnami 0 9.1.3-r0
Chainguard elasticsearch-9.1-config 0 9.1.7-r0
Chainguard elasticsearch-9.1-iamguarded 0 9.1.6-r0
Chainguard elasticsearch-config 0 8.19.2-r3
Chainguard elasticsearch-fips-9.0 0 9.0.8-r0
Chainguard elasticsearch-fips-9.0-bitnami 0 9.0.8-r0
Chainguard elasticsearch-fips-9.0-config 0 9.0.8-r0
Chainguard elasticsearch-fips-9.1 0 9.1.3-r0
Chainguard elasticsearch-fips-9.1-bitnami 0 9.1.3-r0
Chainguard elasticsearch-fips-9.1-config 0 9.1.3-r0
Chainguard flyway 0 11.16.0-r0
Chainguard geoserver-2.26-community 0 2.26.4-r0
Chainguard geoserver-2.26-docker 0 2.26.4-r0
Chainguard geoserver-2.27-docker 0 2.27.3-r0
Chainguard geoserver-2.28-community 0 2.28.0-r0
Chainguard geoserver-2.28-docker 0 2.28.0-r0
Chainguard ghidra 0 11.4-r1
Chainguard gradle-9 0 9.0.0-r1
Chainguard hadoop-client-modules 0 3.3.6-r5
Chainguard jenkins-2 0 2.544-r1
Chainguard jenkins-2.504 0 2.504.3-r8
Chainguard jenkins-2.516 0 2.516.3-r2
Chainguard jenkins-2.528 0 2.528.3-r1
Chainguard jenkins-compat 0 2.535-r0
Chainguard jenkins-docker-agent 0 2.535-r0
Chainguard jenkins-docker-agent-openjdk-17 0 2.544-r1
Chainguard jenkins-docker-agent-openjdk-21 0 2.544-r1
Chainguard jenkins-plugin-manager 0 2.13.2-r1
Chainguard jenkins-plugin-manager-compat 0 2.13.2-r1
Chainguard jenkins-remoting 0 2.535-r0
Chainguard jenkins-utils 0 2.535-r0
Chainguard kafka-3.7 0 3.7.2-r43
Chainguard kafka-3.8 0 3.8.1-r43
Chainguard kafka-3.9 0 3.9.1-r2
Chainguard kafka-4.0 0 4.0.0-r44
Chainguard kafka-bitnami-compat-3.7 0 3.7.2-r43
Chainguard kafka-bitnami-compat-3.8 0 3.8.1-r43
Chainguard kafka-bitnami-compat-3.9 0 3.9.1-r2
Chainguard kafka-bitnami-compat-4.0 0 4.0.0-r44
Chainguard kafka-iamguarded-compat-4.0 0 4.0.0-r44
Chainguard kafka-strimzi-compat 0 0.48.0-r1
Chainguard kafka_exporter-strimzi-compat 0 0.48.0-r1
Chainguard keycloak-26.2-compat 0 26.2.5-r6
Chainguard keycloak-26.3 0 26.3.5-r3
Chainguard keycloak-26.3-compat 0 26.3.5-r3
Chainguard keycloak-26.3-iamguarded-compat 0 26.3.5-r3
Chainguard keycloak-config-cli 0 6.4.0-r45
Chainguard keycloak-config-cli-bitnami-compat 0 6.4.0-r45
Chainguard keycloak-config-cli-compat 0 6.4.0-r45
Chainguard keycloak-config-cli-iamguarded-compat 0 6.4.0-r45
Chainguard keycloak-fips-26.3 0 26.3.5-r4
Chainguard keycloak-fips-26.3-iamguarded-fips 0 26.3.5-r4
Chainguard keycloak-fips-26.3-operator 0 26.3.5-r4
Chainguard keycloak-fips-26.3-operator-compat 0 26.3.5-r4
Chainguard kserve-modelmesh 0 0.12.0-r10
Chainguard kserve-modelmesh 0 0.12.0-r13
Chainguard kserve-modelmesh-compat 0 0.12.0-r10
Chainguard kserve-modelmesh-compat 0 0.12.0-r13
Chainguard liquibase 0 4.33.0-r1
Chainguard localstack-compat 0 4.10.0-r0
Chainguard logstash-9.2 0 9.2.6-r3
Chainguard logstash-9.2-iamguarded-compat 0 9.2.6-r3
Chainguard logstash-9.2-with-output-opensearch 0 9.2.6-r3
Chainguard logstash-9.3 0 9.3.1-r4
Chainguard logstash-9.3-iamguarded-compat 0 9.3.1-r4
Chainguard logstash-9.3-with-output-opensearch 0 9.3.1-r4
Chainguard management-api-for-apache-cassandra-4.0 0 0.1.109-r1
Chainguard management-api-for-apache-cassandra-4.0-compat 0 0.1.109-r1
Chainguard management-api-for-apache-cassandra-4.1 0 0.1.109-r0
Chainguard management-api-for-apache-cassandra-4.1-compat 0 0.1.109-r0
Chainguard management-api-for-apache-cassandra-5.0 0 0.1.109-r0
Chainguard management-api-for-apache-cassandra-5.0-compat 0 0.1.109-r0
Chainguard maven-stage0 0 3.9.12-r0
Chainguard nacos-compat 0 3.1.0-r2
Chainguard neo4j-2025.01 0 2025.01.0-r4
Chainguard neo4j-2025.01-docker-publish 0 2025.01.0-r4
Chainguard neo4j-2025.02 0 2025.02.0-r4
Chainguard neo4j-2025.02-docker-publish 0 2025.02.0-r4
Chainguard neo4j-2025.03 0 2025.03.0-r4
Chainguard neo4j-2025.03-docker-publish 0 2025.03.0-r4
Chainguard neo4j-2025.04 0 2025.04.0-r2
Chainguard neo4j-2025.04-docker-publish 0 2025.04.0-r2
Chainguard neo4j-2025.05 0 2025.05.1-r1
Chainguard neo4j-2025.05-docker-publish 0 2025.05.1-r1
Chainguard neo4j-2025.06 0 2025.06.2-r1
Chainguard neo4j-2025.06-browser 0 2025.06.2-r1
Chainguard neo4j-2025.06-docker-publish 0 2025.06.2-r1
Chainguard neo4j-4.4 0 4.4.44-r2
Chainguard neo4j-4.4-docker-publish 0 4.4.44-r2
Chainguard neo4j-5.26 0 5.26.9-r1
Chainguard neo4j-5.26-docker-publish 0 5.26.9-r1
Chainguard neo4j-5.26-oci-entrypoint 0 5.26.9-r1
Chainguard nextflow 0 25.10.2-r0
Chainguard nextflow-compat 0 25.10.0-r0
Chainguard nrjmx 0 2.7.0-r3
Chainguard opensearch-2 0 2.19.4-r0
Chainguard opensearch-2-alerting 0 2.19.4-r0
Chainguard opensearch-2-analysis-icu 0 2.19.4-r0
Chainguard opensearch-2-analysis-kuromoji 0 2.19.4-r0
Chainguard opensearch-2-analysis-nori 0 2.19.4-r0
Chainguard opensearch-2-analysis-phonetic 0 2.19.4-r0
Chainguard opensearch-2-analysis-smartcn 0 2.19.4-r0
Chainguard opensearch-2-analysis-stempel 0 2.19.4-r0
Chainguard opensearch-2-analysis-ukrainian 0 2.19.4-r0
Chainguard opensearch-2-anomaly-detection 0 2.19.4-r0
Chainguard opensearch-2-asynchronous-search 0 2.19.4-r0
Chainguard opensearch-2-cross-cluster-replication 0 2.19.4-r0
Chainguard opensearch-2-crypto-kms 0 2.19.4-r0
Chainguard opensearch-2-custom-codecs 0 2.19.4-r0
Chainguard opensearch-2-discovery-azure-classic 0 2.19.4-r0
Chainguard opensearch-2-discovery-ec2 0 2.19.4-r0
Chainguard opensearch-2-discovery-gce 0 2.19.4-r0
Chainguard opensearch-2-entrypoint-compat 0 2.19.4-r0
Chainguard opensearch-2-geospatial 0 2.19.4-r0
Chainguard opensearch-2-identity-shiro 0 2.19.4-r0
Chainguard opensearch-2-index-management 0 2.19.4-r0
Chainguard opensearch-2-ingest-attachment 0 2.19.4-r0
Chainguard opensearch-2-job-scheduler 0 2.19.4-r0
Chainguard opensearch-2-k-nn 0 2.19.4-r0

Related vulnerabilities