# CVE-2023-42503: commons DoS — Fixed in 1.24.0

☕

☕ Maven

Not in CISA KEV

MEDIUM severity

# CVE-2023-42503 — commons-compress

MEDIUM [Fix: apache/commons-compress@aae38bf](https://github.com/apache/commons-compress/commit/aae38bfb820159ae7a0b792e779571f6a46b3889)

CVE-2023-42503 is a medium-severity (CVSS 5.5) Improper Input Validation vulnerability in org.apache.commons:commons-compress. A fix is available for org.apache.commons:commons-compress — see the affected versions and patch details below.

Apache Commons Compress: Denial of service via CPU consumption for malformed TAR file

Also known as[GHSA-cgwf-w82q-5jrr](/vulnerability/GHSA-cgwf-w82q-5jrr)

Published

Sep 14, 2023

Updated

Oct 28, 2026

Affected

1 pkg

Patched

1 / 1

Exploits

None indexed

Exploitation data as of Nov 5, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

## EPSS Exploitation Probability

[via FIRST.org ↗](https://www.first.org/epss/)

0.6%probability of exploitation in next 30 days

Lower Risk0.00%

Lower risk than most CVEs49th percentile — riskier than 49% of all scored CVEsHighest risk

0.00%0.37%0.73%1.10%0.0%0.6%May 26Sep 26Nov 26

Probability of exploitation in the next 30 days, from [FIRST.org EPSS](https://www.first.org/epss/).

## How urgent is this, really

## Where this sits among everything scored

## Real-World Exposure

1 pkg affected

☕`org.apache.commons:commons-compress`

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects Maven packages — download data is not available via public APIs for these ecosystems.

## 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](https://issues.apache.org/jira/browse/COMPRESS-612)). The format for the PAX extended headers carrying this data consists of two numbers separated by a period [2](https://pubs.opengroup.org/onlinepubs/9699919799/utilities/pax.html#tag_20_92_13_05), 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](https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html) 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](https://bugs.openjdk.org/browse/JDK-6560193)). 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](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2012-2098).

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.

## Affected Packages

1 total 1 fixed

Ecosystem

Package

Vulnerable range

Fix

☕Maven

`org.apache.commons:commons-compress` 

≥ 1.22&&< 1.24.0

1.24.0`org.apache.commons:commons-compress:1.24.0`

## Affected Products

1 product · 1 configurations

Application

`commons compress`apache

≥ 1.22 && < 1.24.0

range

## Detection & mitigation playbook

Open-source dependency

1.  ### Detect
    
    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for org.apache.commons:commons-compress, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.
    
2.  ### Fix
    
    Update org.apache.commons:commons-compress to 1.24.0 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms CVE-2023-42503 is resolved across your whole dependency graph.
    
3.  ### Workarounds
    
    Cap what an attacker can consume: apply request size, rate and timeout limits in front of the affected component, and run it with memory and CPU limits so exhaustion degrades one worker rather than the whole service.
    

## Fixing This On Your OS

If you run this on a Linux distribution, patch through your package manager against the distro's own security advisory below — it tracks the exact backported fix for your release, which can ship on a different timeline (and sometimes a different severity) than the upstream project.

Red HatModerate

Moderate impact vulnerability in Red Hat JBoss Fuse and Red Hat build of Apache Camel: a locally supplied malformed TAR file with manipulated file-modification-time headers can cause excessive CPU consumption and denial of service when parsed by Apache Commons Compress. The CVSS 3.1 score is 5.5…

Workaround published by Red Hat

> Mitigation for this issue is either not available or the currently available options do not meet the Red Hat Product Security criteria comprising ease of use and deployment, applicability to widespread installation base, or stability.

Source: [Red Hat security advisory for CVE-2023-42503](https://access.redhat.com/security/cve/cve-2023-42503) (CC BY 4.0)

## Frequently Asked Questions

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 \[

O3 Security · Impact-Aware SCA

### Is CVE-2023-42503 in your dependencies?

Find it across Maven, including transitive dependencies.

[Scan my dependencies](/book-demo) [How O3 SCA works](/impact-aware-sca)