Vulnerabilities in pkg:maven/org.apache.commons/commons-compress

PACKAGE
Advisory Identifier: GHSA-4g9r-vxhx-9pgx
Advisory Summary

CVE-2024-25710 is a MODERATE (CVSS 5.9) denial of service vulnerability (CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop')) affecting Apache Commons Compress libraries in the Maven ecosystem. The issue involves denial of service caused by an infinite loop for a corrupted dump file. Remediation is available by upgrading affected packages to version 1.26.0.

11 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:maven/org.apache.commons/commons-compress

11 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:maven/org.apache.commons/commons-compress. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-4g9r-vxhx-9pgx CVE-2024-25710 MODERATE Apache Commons Compress: Denial of service caused by an infinite loop for a corrupted DUMP file
GHSA-4265-ccf5-phj5 CVE-2024-26308 MODERATE Apache Commons Compress: OutOfMemoryError unpacking broken Pack200 file
GHSA-cgwf-w82q-5jrr CVE-2023-42503 MODERATE Apache Commons Compress denial of service vulnerability
GHSA-hrmr-f5m6-m9pq CVE-2018-11771 MODERATE Moderate severity vulnerability that affects org.apache.commons:commons-compress
GHSA-h436-432x-8fvx CVE-2018-1324 MODERATE Apache Commons Compress vulnerable to denial of service due to infinite loop
GHSA-6fxm-66hq-fc96 CVE-2012-2098 MODERATE Uncontrolled Resource Consumption in Apache Commons Compress
GHSA-crv7-7245-f45f CVE-2021-35516 HIGH Improper Handling of Length Parameter Inconsistency in Compress
GHSA-7hfm-57qf-j43q CVE-2021-35515 HIGH Excessive Iteration in Compress
GHSA-mc84-pj99-q6hh CVE-2021-36090 HIGH Improper Handling of Length Parameter Inconsistency in Compress
GHSA-xqfj-vm6h-2x34 CVE-2021-35517 HIGH Improper Handling of Length Parameter Inconsistency in Compress
GHSA-53x6-4x5p-rrvv CVE-2019-12402 HIGH Denial of Service in Apache Commons Compress

CVE-2024-25710 at a Glance

CVE Identifier CVE-2024-25710
GHSA Identifier GHSA-4g9r-vxhx-9pgx
Severity MODERATE
CVSS v3.1 Base Score 5.9
CWE Classification CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop')
Affected Product Apache Commons Compress
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 5.9

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

Attack Vector Local (AV:L)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Changed (S:C)
Confidentiality None (C:N)
Integrity None (I:N)
Availability High (A:H)

How to Fix CVE-2024-25710

To remediate this vulnerability, upgrade all affected Apache Commons Compress 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-compress fixed: 1.26.0
<dependency>
    <groupId>org.apache.commons</groupId>
    <artifactId>commons-compress</artifactId>
    <version>1.26.0</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-2024-25710, 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 Apache Commons Compress in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.26.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-835: Loop with Unreachable Exit Condition ('Infinite Loop'), where the product contains an iteration or loop with an exit condition that cannot be reached, i.e., an infinite loop. In Apache Commons Compress, 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

Loop with Unreachable Exit Condition ('Infinite Loop') vulnerability in Apache Commons Compress. This issue affects Apache Commons Compress: from 1.3 through 1.25.0. Users are recommended to upgrade to version 1.26.0 which fixes the issue.

CVE-2024-25710 Affected Apache Commons Compress Versions

1 component(s)
Fixed Versions:
1.26.0
Product / Package Ecosystem Affected Versions Fixed Version
org.apache.commons:commons-compress
Maven
≥ 1.3
< 1.26.0
1.26.0

References

Frequently Asked Questions

What is CVE-2024-25710?
CVE-2024-25710 is a security vulnerability in Apache Commons Compress involving Denial of service caused by an infinite loop for a corrupted DUMP file under CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop').
Which Apache Commons Compress versions are affected?
Affected versions include releases prior to 1.26.0 across affected packages: org.apache.commons:commons-compress.
What version fixes CVE-2024-25710?
Upgrading to 1.26.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is commons-compress affected?
Yes, org.apache.commons:commons-compress is affected in releases prior to 1.26.0. Upgrade your dependency to 1.26.0 or later.
What is the CVSS score of CVE-2024-25710?
CVE-2024-25710 has a CVSS v3.1 base score of 5.9 (MODERATE) with vector string CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:N/I:N/A:H.
What CWE is associated with CVE-2024-25710?
CVE-2024-25710 is classified under CWE-835: Loop with Unreachable Exit Condition ('Infinite Loop') (The product contains an iteration or loop with an exit condition that cannot be reached, i.e., an infinite loop.).
How can I check Maven dependencies for CVE-2024-25710?
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-4g9r-vxhx-9pgx",
  "modified" : "2025-11-04T19:43:57Z",
  "published" : "2024-02-19T09:30:50Z",
  "aliases" : [ "CVE-2024-25710" ],
  "summary" : "Apache Commons Compress: Denial of service caused by an infinite loop for a corrupted DUMP file",
  "details" : "Loop with Unreachable Exit Condition ('Infinite Loop') vulnerability in Apache Commons Compress. This issue affects Apache Commons Compress: from 1.3 through 1.25.0.\n\nUsers are recommended to upgrade to version 1.26.0 which fixes the issue.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:L/AC:H/PR:N/UI:N/S:C/C:N/I:N/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache.commons:commons-compress"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.3"
      }, {
        "fixed" : "1.26.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-25710"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/apache/commons-compress"
  }, {
    "type" : "WEB",
    "url" : "https://lists.apache.org/thread/cz8qkcwphy4cx8gltn932ln51cbtq6kf"
  }, {
    "type" : "WEB",
    "url" : "https://security.netapp.com/advisory/ntap-20240307-0010"
  }, {
    "type" : "WEB",
    "url" : "http://seclists.org/fulldisclosure/2024/Aug/37"
  }, {
    "type" : "WEB",
    "url" : "http://www.openwall.com/lists/oss-security/2024/02/19/1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-835" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-02-20T23:58:47Z",
    "nvd_published_at" : "2024-02-19T09:15:37Z"
  }
}