CVE-2024-26308: Apache Commons Compress OutOfMemoryError Unpacking Broken Pack200 File Vulnerability
MODERATECVE-2024-26308 is a MODERATE (CVSS 5.5) outofmemoryerror unpacking broken pack200 file vulnerability (CWE-770: Allocation of Resources Without Limits or Throttling) affecting Apache Commons Compress libraries in the Maven ecosystem. The issue involves outofmemoryerror unpacking broken pack200 file. Remediation is available by upgrading affected packages to version 1.26.0.
CVE-2024-26308 at a Glance
Security Impact
CVSS: 5.5
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H).
How to Fix CVE-2024-26308
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.
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
<version>1.26.0</version>
</dependency>
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-26308, 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-770: Allocation of Resources Without Limits or Throttling, where the product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated. 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
CVE-2024-26308 Affected Apache Commons Compress Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
org.apache.commons:commons-compress
|
Maven |
≥ 1.21
< 1.26.0
|
1.26.0
|
References
Frequently Asked Questions
What is CVE-2024-26308?
Which Apache Commons Compress versions are affected?
What version fixes CVE-2024-26308?
Is commons-compress affected?
What is the CVSS score of CVE-2024-26308?
What CWE is associated with CVE-2024-26308?
How can I check Maven dependencies for CVE-2024-26308?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-4265-ccf5-phj5",
"modified" : "2025-02-13T19:13:31Z",
"published" : "2024-02-19T09:30:52Z",
"aliases" : [ "CVE-2024-26308" ],
"summary" : "Apache Commons Compress: OutOfMemoryError unpacking broken Pack200 file",
"details" : "Allocation of Resources Without Limits or Throttling vulnerability in Apache Commons Compress. This issue affects Apache Commons Compress: from 1.21 before 1.26.\n\nUsers are recommended to upgrade to version 1.26, which fixes the issue.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Maven",
"name" : "org.apache.commons:commons-compress"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "1.21"
}, {
"fixed" : "1.26.0"
} ]
} ]
} ],
"references" : [ {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2024-26308"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/apache/commons-compress"
}, {
"type" : "WEB",
"url" : "https://lists.apache.org/thread/ch5yo2d21p7vlqrhll9b17otbyq4npfg"
}, {
"type" : "WEB",
"url" : "https://security.netapp.com/advisory/ntap-20240307-0009"
}, {
"type" : "WEB",
"url" : "http://www.openwall.com/lists/oss-security/2024/02/19/2"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-770" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-02-20T23:59:29Z",
"nvd_published_at" : "2024-02-19T09:15:38Z"
}
}