# CVE-2023-42503: Apache Commons Compress: Denial of service via CPU consumption for malformed TAR file

- Priority: **Routine**
- Reason: Not severe (CVSS 5.5, local access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2023-09-14 · Modified: 2025-02-13
- Aliases: UBUNTU-CVE-2023-42503, DEBIAN-CVE-2023-42503, CGA-24qg-m4q6-pf58, CGA-26fv-vmqp-vw8x, CGA-2fhx-rwxq-5crq, CGA-2hf8-4cf7-gv58, CGA-2pr7-52rw-c9f9, CGA-37q4-m4x6-wvvc, CGA-3f24-c67x-wwg2, CGA-3g2x-24cx-qfjm, CGA-3wjc-857x-456p, CGA-3xr7-gxw7-vq8x, CGA-4h7c-5rcg-fvqc, CGA-4w28-f6jv-8wfc, CGA-56cq-jxr5-4r3v, CGA-56pf-rv76-62f5, CGA-5f3j-x27q-29gh, CGA-5j8r-hpm9-qqff, CGA-5jh9-xq67-px8w, CGA-5jvp-7jhr-j3m4, CGA-5mwf-98g2-573v, CGA-5rh2-whm4-rp76, CGA-5x2j-vq5r-262x, CGA-64qv-2v5h-jwmw, CGA-69fm-64m2-p6h2, CGA-6j4m-63qj-fpvc, CGA-6phc-jm4w-pw4m, CGA-6r2p-f9j6-p4h4, CGA-6vgm-hjgh-rr8g, CGA-6x63-rx2c-v36m, CGA-72wx-5pjm-pgp5, CGA-752v-7vx9-vv4m, CGA-777w-98j2-45xq, CGA-7fm4-7x8c-pfm6, CGA-7fpv-gm93-m332, CGA-82h7-v3vr-2cjj, CGA-832r-hcgr-3688, CGA-86rf-x32v-p24x, CGA-87cf-6p27-7q9w, CGA-89hf-97f9-x3wj, CGA-8f7q-h34f-mvwv, CGA-8gqp-6cwh-q628, CGA-8hq6-jx9v-2x5p, CGA-8q9x-q85x-x3j6, CGA-8v22-5795-37hj, CGA-8xh6-857j-5qjj, CGA-938v-37r9-466r, CGA-94c2-vv24-2hgj, CGA-983v-pvrv-cmgf, CGA-9923-pf7f-r9hc, CGA-9935-85v6-vxr6, CGA-99vw-xhvw-7p28, CGA-9qxg-57f4-75qm, CGA-9r4q-fg62-m6pf, CGA-9xf8-v45c-rqq3, CGA-c2hw-g944-ppx4, CGA-cgfr-fc26-c279, CGA-cmw5-255v-vhjw, CGA-cp5m-ff7j-g86m, CGA-cqpq-fcp6-rgp7, CGA-cvc6-968g-6cfv, CGA-cvqj-98v7-hgpr, CGA-f3cf-fg67-26qj, CGA-f3rr-2q2q-vwjc, CGA-f48q-9pr5-x2h4, CGA-fgww-f8hw-2gc7, CGA-fqgh-6jp3-6628, CGA-fv54-f47j-fcwq, CGA-fvqx-7hjq-cvv4, CGA-g2rc-wg4q-wwrg, CGA-g47q-82rr-q985, CGA-gfj2-8vmv-3hwj, CGA-gfj2-wmvf-x5fp, CGA-gh33-jgq6-fr8c, CGA-gjfm-6cjm-63jx, CGA-gjx2-vx6v-6gw4, CGA-gpv8-hcjr-4qjx, CGA-gq22-rg89-cp2r, CGA-gqgp-fmr2-5p5x, CGA-gqjh-rjg8-8846, CGA-gvcv-8f3v-cwq4, CGA-h62w-pp99-2pq5, CGA-hf8m-4px7-gf28, CGA-j2rm-43f6-8w9f, CGA-j4m9-8f4m-62rp, CGA-j7wp-7j7g-jj9p, CGA-jhwx-47jg-wwx2, CGA-jr6m-r8qg-2w77, CGA-m2xc-4fw5-7mxp, CGA-m5xp-gx3x-r4f4, CGA-m833-r3rr-f8qx, CGA-mf53-242p-6vf7, CGA-mgp3-62cx-jq6c, CGA-mp5r-hg63-57q6, CGA-mx5w-4pr8-vv7j, CGA-p8rp-gqp2-x247, CGA-p94g-3j7p-qw9g, CGA-pff6-fpj5-v52r, CGA-pgf7-wc7g-f3wr, CGA-pgwh-7924-596q, CGA-ph76-92c5-vc2r, CGA-pj52-6gq7-9x5r, CGA-pmj7-fqf2-hqfx, CGA-q595-hvhj-8wwx, CGA-q88x-xqq6-c4cv, CGA-qpgf-ch7w-9pg6, CGA-qvg7-7fwf-ff25, CGA-qvv4-72mp-jg7m, CGA-qxpf-m34v-6447, CGA-r84v-gmvq-2j4r, CGA-r88f-xcg4-75j8, CGA-r9f9-j4c6-vfv4, CGA-vr6j-2pcx-3q92, CGA-w32g-wvh2-chcr, CGA-w3pf-xxcv-phw3, CGA-w5c3-2rr8-947f, CGA-w6xr-5xv7-h5jx, CGA-x545-qv48-mhr7, CGA-x694-cm62-mpmm, CGA-x8m5-w3rj-v78p, CGA-xh52-2657-p2g7, CGA-xmqf-vffg-vgq7, CGA-2pv4-9hxp-7wg2, CGA-3j97-86w3-462r, CGA-4g32-pv79-53r5, CGA-75w3-f56x-fqx2, CGA-84vv-5hff-49vc, CGA-8v68-jp27-qfhc, CGA-pc9j-9gwp-34f3, GHSA-cgwf-w82q-5jrr, CGA-rrwj-r7wc-hr38
- Record: https://cvemate.com/vulnerability/CVE-2023-42503 · JSON: https://cvemate.com/vulnerability/CVE-2023-42503/json

## Description

```text
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].

[1]:  https://issues.apache.org/jira/browse/COMPRESS-612
[2]:  https://pubs.opengroup.org/onlinepubs/9699919799/utilities/pax.html#tag_20_92_13_05
[3]:  https://docs.oracle.com/javase/8/docs/api/java/math/BigDecimal.html
[4]:  https://bugs.openjdk.org/browse/JDK-6560193
[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.
```

## Signals

- CVSS: 5.5 medium (v3.1, NVD) CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:H
- EPSS: 0.606%, percentile 50.478%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected (first 20 of 129)

- apache software foundation apache commons compress: ≥ 1.22, \< 1.24.0
- apache commons\_compress: ≥ 1.22, \< 1.24.0
- chainguard hadoop-fips-3.4.2 (Chainguard): All versions (No fix recorded)
- chainguard hadoop-fips-3.5 (Chainguard): All versions (No fix recorded) \| \< 3.5.0-r33
- chainguard kayenta-2026.1 (Chainguard): \< 2026.1.0-r1
- chainguard kayenta-fips-2026.1 (Chainguard): \< 2026.1.0-r1
- chainguard opensearch-2 (Chainguard): \< 2.10.0-r1
- chainguard trino (Chainguard): \< 444-r0
- chainguard trino-config (Chainguard): \< 444-r0
- chainguard trino-oci-entrypoint (Chainguard): \< 444-r0
- chainguard trino-plugin-ai-functions (Chainguard): \< 444-r0
- chainguard trino-plugin-bigquery (Chainguard): \< 444-r0
- chainguard trino-plugin-blackhole (Chainguard): \< 444-r0
- chainguard trino-plugin-cassandra (Chainguard): \< 444-r0
- chainguard trino-plugin-clickhouse (Chainguard): \< 444-r0
- chainguard trino-plugin-delta-lake (Chainguard): \< 444-r0
- chainguard trino-plugin-druid (Chainguard): \< 444-r0
- chainguard trino-plugin-duckdb (Chainguard): \< 444-r0
- chainguard trino-plugin-elasticsearch (Chainguard): \< 444-r0
- chainguard trino-plugin-exasol (Chainguard): \< 444-r0

## References

- <https://lists.apache.org/thread/5xwcyr600mn074vgxq92tjssrchmc93c>
- <https://security.netapp.com/advisory/ntap-20231020-0003/>
- <https://ubuntu.com/security/CVE-2023-42503>
- <https://www.cve.org/CVERecord?id=CVE-2023-42503>
- <https://security-tracker.debian.org/tracker/CVE-2023-42503>
- <https://nvd.nist.gov/vuln/detail/CVE-2023-42503>
- <https://github.com/apache/commons-compress/commit/aae38bfb820159ae7a0b792e779571f6a46b3889>
- <https://github.com/apache/commons-compress>
- <https://security.netapp.com/advisory/ntap-20231020-0003>

---

Data as of 2026-12-05T03:14:34.254Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
