CVE-2023-42503 Apache Commons Compress: Denial of service via CPU consumption for malformed TAR file
- Published
- Updated
- Exploit status
- No public exploit known
- Technology
- UbuntuDebian
Description
Improper Input Validation, Uncontrolled Resource Consumption vulnerability in Apache Commons Compress in TAR parsing.This issue affects Apache Commons Compress: from 1.22 before 1.24.0.
Users are recommended to upgrade to version 1.24.0, which fixes the issue.
A third party can create a malformed TAR file by manipulating file modification times headers, which when parsed with Apache Commons Compress, will cause a denial of service issue via CPU consumption.
In version 1.22 of Apache Commons Compress, support was added for file modification times with higher precision (issue # COMPRESS-612 1). The format for the PAX extended headers carrying this data consists of two numbers separated by a period 2, indicating seconds and subsecond precision (for example “1647221103.5998539”). The impacted fields are “atime”, “ctime”, “mtime” and “LIBARCHIVE.creationtime”. No input validation is performed prior to the parsing of header values.
Parsing of these numbers uses the BigDecimal 3 class from the JDK which has a publicly known algorithmic complexity issue when doing operations on large numbers, causing denial of service (see issue # JDK-6560193 4). A third party can manipulate file time headers in a TAR file by placing a number with a very long fraction (300,000 digits) or a number with exponent notation (such as “9e9999999”) within a file modification time header, and the parsing of files with these headers will take hours instead of seconds, leading to a denial of service via exhaustion of CPU resources. This issue is similar to CVE-2012-2098 5.
Only applications using CompressorStreamFactory class (with auto-detection of file types), TarArchiveInputStream and TarFile classes to parse TAR files are impacted. Since this code was introduced in v1.22, only that version and later versions are impacted.
Upgrade path
13 packages: 4 fixed, 9 with no fix yet.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| debian/libcommons-compress-java(Debian 12) | = 1.22-1; = 1.23.0-1; = 1.24.0-1; = 1.25.0-1 +4 more | No fix listed | No fix yet |
| ubuntu/libcommons-compress-java(Ubuntu 16.04) | = 1.9-1; = 1.10-1; = 1.10-2; All versions | No fix listed | No fix yet |
| ubuntu/libcommons-compress-java(Ubuntu 18.04) | = 1.13-1; = 1.13-2; = 1.18-1~18.04; All versions | No fix listed | No fix yet |
| ubuntu/libcommons-compress-java(Ubuntu 20.04) | = 1.18-3; = 1.19-1; All versions | No fix listed | No fix yet |
| ubuntu/libcommons-compress-java(Ubuntu 22.04) | = 1.20-1; = 1.21-1; All versions | No fix listed | No fix yet |
| ubuntu/libcommons-compress-java(Ubuntu 24.04) | = 1.23.0-1; = 1.24.0-1; = 1.25.0-1; All versions | No fix listed | No fix yet |
| ubuntu/libcommons-compress-java(Ubuntu 25.10) | = 1.27.1-2; All versions | No fix listed | No fix yet |
| ubuntu/libcommons-compress-java(Ubuntu 26.04) | = 1.27.1-2; All versions | No fix listed | No fix yet |
| ubuntu/libcommons-compress-java(Ubuntu 26.10) | = 1.27.1-2; All versions | No fix listed | No fix yet |
| apache commons compress | >= 1.22, < 1.24.0 | 1.24.0 | Fixed |
| debian/libcommons-compress-java(Debian 13) | < 1.24.0-1 | 1.24.0-1 | Fixed |
| debian/libcommons-compress-java(Debian 14) | < 1.24.0-1 | 1.24.0-1 | Fixed |
| org.apache.commons/commons-compress(Maven) | = 1.22; = 1.23.0; >= 1.22, < 1.24.0 | 1.24.0 | Fixed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| org.apache.commons/commons-compress(Maven) | >= 1.22, < 1.24.0 | 1.24.0 |
| org.apache.commons/commons-compress(Maven) | = 1.22 | No fix listed |
| org.apache.commons/commons-compress(Maven) | = 1.23.0 | No fix listed |
| debian/libcommons-compress-java(Debian:12) | All versions | No fix listed |
| debian/libcommons-compress-java(Debian:12) | = 1.22-1 | No fix listed |
| debian/libcommons-compress-java(Debian:12) | = 1.23.0-1 | No fix listed |
| debian/libcommons-compress-java(Debian:12) | = 1.24.0-1 | No fix listed |
| debian/libcommons-compress-java(Debian:12) | = 1.25.0-1 | No fix listed |
| debian/libcommons-compress-java(Debian:12) | = 1.27.1-1 | No fix listed |
| debian/libcommons-compress-java(Debian:12) | = 1.27.1-2 | No fix listed |
| debian/libcommons-compress-java(Debian:12) | = 1.28.0-1 | No fix listed |
| debian/libcommons-compress-java(Debian:13) | < 1.24.0-1 | 1.24.0-1 |
| debian/libcommons-compress-java(Debian:14) | < 1.24.0-1 | 1.24.0-1 |
| ubuntu/libcommons-compress-java(Ubuntu:22.04) | All versions | No fix listed |
| ubuntu/libcommons-compress-java(Ubuntu:24.04) | All versions | No fix listed |
| apache commons compress | >= 1.22, < 1.24.0 | 1.24.0 |
| ubuntu/libcommons-compress-java(Ubuntu:26.04) | All versions | No fix listed |
| ubuntu/libcommons-compress-java(Ubuntu:26.10) | All versions | No fix listed |
| ubuntu/libcommons-compress-java(Ubuntu:16.04) | All versions | No fix listed |
| ubuntu/libcommons-compress-java(Ubuntu:16.04) | = 1.9-1 | No fix listed |
| ubuntu/libcommons-compress-java(Ubuntu:16.04) | = 1.10-1 | No fix listed |
| ubuntu/libcommons-compress-java(Ubuntu:16.04) | = 1.10-2 | No fix listed |
| ubuntu/libcommons-compress-java(Ubuntu:18.04) | All versions | No fix listed |
| ubuntu/libcommons-compress-java(Ubuntu:18.04) | = 1.13-1 | No fix listed |
| ubuntu/libcommons-compress-java(Ubuntu:18.04) | = 1.13-2 | No fix listed |
Show 13 more
| Product | Affected versions | Fixed in |
|---|---|---|
| ubuntu/libcommons-compress-java(Ubuntu:18.04) | = 1.18-1~18.04 | No fix listed |
| ubuntu/libcommons-compress-java(Ubuntu:20.04) | All versions | No fix listed |
| ubuntu/libcommons-compress-java(Ubuntu:20.04) | = 1.18-3 | No fix listed |
| ubuntu/libcommons-compress-java(Ubuntu:20.04) | = 1.19-1 | No fix listed |
| ubuntu/libcommons-compress-java(Ubuntu:22.04) | = 1.20-1 | No fix listed |
| ubuntu/libcommons-compress-java(Ubuntu:22.04) | = 1.21-1 | No fix listed |
| ubuntu/libcommons-compress-java(Ubuntu:24.04) | = 1.23.0-1 | No fix listed |
| ubuntu/libcommons-compress-java(Ubuntu:24.04) | = 1.24.0-1 | No fix listed |
| ubuntu/libcommons-compress-java(Ubuntu:24.04) | = 1.25.0-1 | No fix listed |
| ubuntu/libcommons-compress-java(Ubuntu:25.10) | All versions | No fix listed |
| ubuntu/libcommons-compress-java(Ubuntu:25.10) | = 1.27.1-2 | No fix listed |
| ubuntu/libcommons-compress-java(Ubuntu:26.10) | = 1.27.1-2 | No fix listed |
| ubuntu/libcommons-compress-java(Ubuntu:26.04) | = 1.27.1-2 | No fix listed |
References
- nvd.nist.gov third-party-advisory vendor-advisory
- github.com patch
- github.com product
- lists.apache.org issue-tracking mailing-list url-repurposed vendor-advisory
- security.netapp.com third-party-advisory
- github.com
- Debian Security Tracker CVE-2023-42503 vendor-advisory
- Ubuntu CVE tracker issue-tracking vendor-advisory
- www.cve.org issue-tracking
- bugs.debian.org issue-tracking