Cloudanix VulnDB

CVE-2023-42503

Medium · 5.5

CVSS

5.5

EPSS

0.6%

Published

Sep 14, 2023

CISA due date

—

Cloudanix analysis

Next patch cycle SSVC: Track

A specially crafted archive file can make affected Java applications spend excessive processing power and become slow or unavailable.

Exploitation
Requires User Interaction
Attacker needs
User Interaction
Complexity
Low
Impact
Denial Of Service
Component
Library
Class
Denial of service
Remediation
Upgrade
Effort
Medium
Patch risk
Low

What it actually does

Apache Commons Compress versions 1.22 through versions before 1.24.0 can consume excessive CPU while parsing malicious TAR/PAX metadata. The vulnerable code parses high-precision timestamp fields such as atime, ctime, mtime, and LIBARCHIVE.creationtime using Java BigDecimal without sufficient validation. An attacker can place extremely large fractional timestamp values or exponent notation such as 9e9999999 in TAR extended headers, causing parsing operations that should complete quickly to run for minutes or hours. The impact is denial of service through CPU exhaustion in applications that parse attacker-supplied TAR archives using CompressorStreamFactory auto-detection, TarArchiveInputStream, or TarFile.

Why it matters to the business

Systems that accept, scan, import, unpack, or process TAR archives can become slow or unavailable if they process a crafted file. This can disrupt file upload workflows, package ingestion, backup processing, document pipelines, malware scanning, CI/CD artifact handling, or any service that automatically inspects archives. The issue is not known to be in CISA KEV, has low EPSS, and has no listed mature public exploitation, but it remains relevant because Apache Commons Compress is commonly embedded as a dependency inside Java applications and may be present indirectly through other software.

How an attack unfolds

An attacker first identifies an application or service that accepts TAR archives or archive formats auto-detected by Apache Commons Compress. The attacker creates a TAR file containing PAX extended headers with malformed timestamp metadata, for example an atime, ctime, mtime, or LIBARCHIVE.creationtime value with a very long fractional component or an extreme exponent. When the target application parses the archive using affected Apache Commons Compress classes, the library passes the malformed value into BigDecimal. Due to algorithmic complexity in BigDecimal handling of these inputs, parsing consumes excessive CPU for an extended period. Repeated uploads or submissions can tie up worker threads and CPU cores, causing degraded performance or denial of service for legitimate users.

How to fix it

Upgrade Apache Commons Compress to version 1.24.0 or later. For source builds, ensure the fix corresponding to commit e52eabe9c0eb47b436e873ad7cb83fe737164dec is present. Review dependency trees because Commons Compress is often included transitively by other Java components. If immediate upgrade is not possible, mitigate by rejecting untrusted TAR files, disabling archive auto-detection for untrusted inputs, applying strict upload size and processing time limits, isolating archive parsing in a resource-constrained worker, limiting concurrent archive-processing jobs, and validating PAX timestamp headers before parsing. Specifically reject atime, ctime, mtime, and LIBARCHIVE.creationtime values with excessive length, excessive decimal precision, exponent notation, or nonconforming timestamp format.

How to confirm the fix worked

Confirm that deployed applications resolve Apache Commons Compress to version 1.24.0 or later by inspecting Maven, Gradle, SBT, Bazel, vendor, container, and application package dependency outputs. Search for vulnerable versions 1.22 and 1.23.x in software composition analysis results and runtime classpaths. Validate that applications handling TAR files no longer exhibit abnormal CPU usage when processing test archives containing oversized PAX timestamp fields. Confirm that file upload, archive scanning, and ingestion services enforce file size, processing timeout, concurrency, and input validation limits. Where vendor products bundle Commons Compress, verify the vendor advisory or updated package includes the fixed library version or the referenced fix commit.

Typical attack path

  1. Find an application, API, scanner, build system, or ingestion workflow that accepts TAR archives or auto-detects archive formats.
  2. Create a TAR archive with PAX extended timestamp headers containing extremely large numeric values, long fractional timestamp values, or exponent notation.
  3. Submit or upload the crafted archive to the target service.
  4. The application parses the TAR file using vulnerable Apache Commons Compress code paths such as CompressorStreamFactory, TarArchiveInputStream, or TarFile.
  5. The timestamp field is parsed with Java BigDecimal, causing excessive CPU consumption.
  6. Repeat submissions if needed to exhaust worker threads, increase queue latency, or make the service unavailable.

How to detect it

To determine whether this was already exploited, focus on systems that accept or process TAR archives. Review web access logs, API gateway logs, file upload logs, object storage events, archive scanner logs, application logs, and job queue telemetry for TAR submissions followed by unusually long processing times, request timeouts, worker restarts, or CPU spikes. Look for uploaded or quarantined TAR files containing PAX extended headers with timestamp fields atime, ctime, mtime, or LIBARCHIVE.creationtime that contain extremely long decimal fractions or exponent notation. On Java services, review thread dumps and APM traces for threads spending excessive time in java.math.BigDecimal or Apache Commons Compress TAR parsing classes. Correlate repeated archive submissions from the same source, abnormal queue backlogs, and CPU saturation without corresponding increases in normal traffic. If available, inspect retained upload samples using safe offline tooling and avoid opening suspicious archives in production services.

  • org.apache.commons.compress.archivers.tar.TarArchiveInputStream
  • org.apache.commons.compress.archivers.tar.TarFile
  • org.apache.commons.compress.archivers.ArchiveStreamFactory
  • org.apache.commons.compress.compressors.CompressorStreamFactory
  • java.math.BigDecimal
  • LIBARCHIVE.creationtime
  • LIBARCHIVE.creationtime=
  • atime=
  • ctime=
  • mtime=
  • 9e9999999
  • e9999999
  • pax_global_header
  • PaxHeaders
  • ustar

What your security team should do

  • Inventory Java applications and vendor products that include Apache Commons Compress, prioritizing internet-facing file upload services, artifact repositories, CI/CD systems, malware scanners, document processing services, and backup/import pipelines.
  • Upgrade all affected deployments using Apache Commons Compress 1.22 through pre-1.24.0 releases to version 1.24.0 or later.
  • Review transitive dependencies and packaged JARs rather than relying only on direct dependency declarations.
  • Add defensive limits around archive processing, including CPU timeouts, worker isolation, queue limits, upload limits, and maximum archive metadata length.
  • Add validation or detection for suspicious PAX timestamp headers using atime, ctime, mtime, or LIBARCHIVE.creationtime with extreme numeric length or exponent notation.
  • Monitor archive-processing services for sudden CPU saturation, long-running Java threads, request timeouts, and repeated failed or slow TAR parsing events.
  • If exploitation is suspected, preserve submitted archive samples, application logs, thread dumps, access logs, and resource utilization telemetry for forensic review.

The record

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.

Affected packages

Ecosystem Package Introduced Fixed
Maven org.apache.commons:commons-compress 1.22 1.24.0
Chainguard hive 0 4.0.1-r1
Chainguard hive-compat 0 4.0.1-r1
Chainguard opensearch-2 0 2.10.0-r1
Chainguard opensearch-2-alerting 0 2.10.0-r1
Chainguard opensearch-2-analysis-icu 0 2.10.0-r1
Chainguard opensearch-2-analysis-kuromoji 0 2.10.0-r1
Chainguard opensearch-2-analysis-nori 0 2.10.0-r1
Chainguard opensearch-2-analysis-phonetic 0 2.10.0-r1
Chainguard opensearch-2-analysis-smartcn 0 2.10.0-r1
Chainguard opensearch-2-analysis-stempel 0 2.10.0-r1
Chainguard opensearch-2-analysis-ukrainian 0 2.10.0-r1
Chainguard opensearch-2-anomaly-detection 0 2.10.0-r1
Chainguard opensearch-2-asynchronous-search 0 2.10.0-r1
Chainguard opensearch-2-cross-cluster-replication 0 2.10.0-r1
Chainguard opensearch-2-crypto-kms 0 2.10.0-r1
Chainguard opensearch-2-custom-codecs 0 2.10.0-r1
Chainguard opensearch-2-discovery-azure-classic 0 2.10.0-r1
Chainguard opensearch-2-discovery-ec2 0 2.10.0-r1
Chainguard opensearch-2-discovery-gce 0 2.10.0-r1
Chainguard opensearch-2-entrypoint-compat 0 2.10.0-r1
Chainguard opensearch-2-geospatial 0 2.10.0-r1
Chainguard opensearch-2-identity-shiro 0 2.10.0-r1
Chainguard opensearch-2-index-management 0 2.10.0-r1
Chainguard opensearch-2-ingest-attachment 0 2.10.0-r1
Chainguard opensearch-2-job-scheduler 0 2.10.0-r1
Chainguard opensearch-2-k-nn 0 2.10.0-r1
Chainguard opensearch-2-mapper-annotated-text 0 2.10.0-r1
Chainguard opensearch-2-mapper-murmur3 0 2.10.0-r1
Chainguard opensearch-2-mapper-size 0 2.10.0-r1
Chainguard opensearch-2-ml-commons 0 2.10.0-r1
Chainguard opensearch-2-neural-search 0 2.10.0-r1
Chainguard opensearch-2-notifications 0 2.10.0-r1
Chainguard opensearch-2-observability 0 2.10.0-r1
Chainguard opensearch-2-performance-analyzer 0 2.10.0-r1
Chainguard opensearch-2-reporting 0 2.10.0-r1
Chainguard opensearch-2-repository-azure 0 2.10.0-r1
Chainguard opensearch-2-repository-gcs 0 2.10.0-r1
Chainguard opensearch-2-repository-s3 0 2.10.0-r1
Chainguard opensearch-2-security 0 2.10.0-r1
Chainguard opensearch-2-security-analytics 0 2.10.0-r1
Chainguard opensearch-2-sql 0 2.10.0-r1
Chainguard opensearch-2-store-smb 0 2.10.0-r1
Chainguard opensearch-2-telemetry-otel 0 2.10.0-r1
Chainguard opensearch-2-transport-nio 0 2.10.0-r1
Chainguard trino 0 444-r0
Chainguard trino-config 0 444-r0
Chainguard trino-oci-entrypoint 0 444-r0
Chainguard trino-plugin-accumulo 0 444-r0
Chainguard trino-plugin-ai-functions 0 444-r0
Chainguard trino-plugin-atop 0 444-r0
Chainguard trino-plugin-bigquery 0 444-r0
Chainguard trino-plugin-blackhole 0 444-r0
Chainguard trino-plugin-cassandra 0 444-r0
Chainguard trino-plugin-clickhouse 0 444-r0
Chainguard trino-plugin-delta-lake 0 444-r0
Chainguard trino-plugin-druid 0 444-r0
Chainguard trino-plugin-duckdb 0 444-r0
Chainguard trino-plugin-elasticsearch 0 444-r0
Chainguard trino-plugin-example-http 0 444-r0
Chainguard trino-plugin-exasol 0 444-r0
Chainguard trino-plugin-exchange-filesystem 0 444-r0
Chainguard trino-plugin-exchange-hdfs 0 444-r0
Chainguard trino-plugin-faker 0 444-r0
Chainguard trino-plugin-functions-python 0 444-r0
Chainguard trino-plugin-geospatial 0 444-r0
Chainguard trino-plugin-google-sheets 0 444-r0
Chainguard trino-plugin-hive 0 444-r0
Chainguard trino-plugin-http-event-listener 0 444-r0
Chainguard trino-plugin-http-server-event-listener 0 444-r0
Chainguard trino-plugin-hudi 0 444-r0
Chainguard trino-plugin-iceberg 0 444-r0
Chainguard trino-plugin-ignite 0 444-r0
Chainguard trino-plugin-jmx 0 444-r0
Chainguard trino-plugin-kafka 0 444-r0
Chainguard trino-plugin-kafka-event-listener 0 444-r0
Chainguard trino-plugin-kinesis 0 444-r0
Chainguard trino-plugin-kudu 0 444-r0
Chainguard trino-plugin-lakehouse 0 444-r0
Chainguard trino-plugin-ldap-group-provider 0 444-r0
Chainguard trino-plugin-local-file 0 444-r0
Chainguard trino-plugin-loki 0 444-r0
Chainguard trino-plugin-mariadb 0 444-r0
Chainguard trino-plugin-memory 0 444-r0
Chainguard trino-plugin-ml 0 444-r0
Chainguard trino-plugin-mongodb 0 444-r0
Chainguard trino-plugin-mysql 0 444-r0
Chainguard trino-plugin-mysql-event-listener 0 444-r0
Chainguard trino-plugin-opa 0 444-r0
Chainguard trino-plugin-openlineage 0 444-r0
Chainguard trino-plugin-opensearch 0 444-r0
Chainguard trino-plugin-oracle 0 444-r0
Chainguard trino-plugin-password-authenticators 0 444-r0
Chainguard trino-plugin-phoenix5 0 444-r0
Chainguard trino-plugin-pinot 0 444-r0
Chainguard trino-plugin-postgresql 0 444-r0
Chainguard trino-plugin-prometheus 0 444-r0
Chainguard trino-plugin-ranger 0 444-r0
Chainguard trino-plugin-raptor-legacy 0 444-r0
Chainguard trino-plugin-redis 0 444-r0
Chainguard trino-plugin-redshift 0 444-r0
Chainguard trino-plugin-resource-group-managers 0 444-r0
Chainguard trino-plugin-session-property-managers 0 444-r0
Chainguard trino-plugin-singlestore 0 444-r0
Chainguard trino-plugin-snowflake 0 444-r0
Chainguard trino-plugin-spooling-filesystem 0 444-r0
Chainguard trino-plugin-sqlserver 0 444-r0
Chainguard trino-plugin-teradata-functions 0 444-r0
Chainguard trino-plugin-thrift 0 444-r0
Chainguard trino-plugin-tpcds 0 444-r0
Chainguard trino-plugin-tpch 0 444-r0
Chainguard trino-plugin-vertica 0 444-r0
Debian:12 libcommons-compress-java 0 No fix
Debian:13 libcommons-compress-java 0 1.24.0-1
Ubuntu:16.04:LTS libcommons-compress-java 0 No fix
Ubuntu:18.04:LTS libcommons-compress-java 0 No fix
Ubuntu:20.04:LTS libcommons-compress-java 0 No fix
Ubuntu:22.04:LTS libcommons-compress-java 0 No fix
Ubuntu:24.04:LTS libcommons-compress-java 0 No fix
Ubuntu:24.10 libcommons-compress-java 0 No fix
Ubuntu:25.04 libcommons-compress-java 0 No fix
Ubuntu:25.10 libcommons-compress-java 0 No fix
Ubuntu:Pro:16.04:LTS libcommons-compress-java 0 No fix
Ubuntu:Pro:18.04:LTS libcommons-compress-java 0 No fix
Ubuntu:Pro:20.04:LTS libcommons-compress-java 0 No fix
Wolfi opensearch-2 0 2.10.0-r1
Wolfi opensearch-2-alerting 0 2.10.0-r1
Wolfi opensearch-2-analysis-icu 0 2.10.0-r1
Wolfi opensearch-2-analysis-kuromoji 0 2.10.0-r1
Wolfi opensearch-2-analysis-nori 0 2.10.0-r1
Wolfi opensearch-2-analysis-phonetic 0 2.10.0-r1
Wolfi opensearch-2-analysis-smartcn 0 2.10.0-r1
Wolfi opensearch-2-analysis-stempel 0 2.10.0-r1
Wolfi opensearch-2-analysis-ukrainian 0 2.10.0-r1
Wolfi opensearch-2-anomaly-detection 0 2.10.0-r1
Wolfi opensearch-2-asynchronous-search 0 2.10.0-r1
Wolfi opensearch-2-cross-cluster-replication 0 2.10.0-r1
Wolfi opensearch-2-crypto-kms 0 2.10.0-r1
Wolfi opensearch-2-custom-codecs 0 2.10.0-r1
Wolfi opensearch-2-discovery-azure-classic 0 2.10.0-r1
Wolfi opensearch-2-discovery-ec2 0 2.10.0-r1
Wolfi opensearch-2-discovery-gce 0 2.10.0-r1
Wolfi opensearch-2-geospatial 0 2.10.0-r1
Wolfi opensearch-2-identity-shiro 0 2.10.0-r1
Wolfi opensearch-2-index-management 0 2.10.0-r1
Wolfi opensearch-2-ingest-attachment 0 2.10.0-r1
Wolfi opensearch-2-job-scheduler 0 2.10.0-r1
Wolfi opensearch-2-k-nn 0 2.10.0-r1
Wolfi opensearch-2-mapper-annotated-text 0 2.10.0-r1
Wolfi opensearch-2-mapper-murmur3 0 2.10.0-r1
Wolfi opensearch-2-mapper-size 0 2.10.0-r1
Wolfi opensearch-2-ml-commons 0 2.10.0-r1
Wolfi opensearch-2-neural-search 0 2.10.0-r1
Wolfi opensearch-2-notifications 0 2.10.0-r1
Wolfi opensearch-2-observability 0 2.10.0-r1
Wolfi opensearch-2-performance-analyzer 0 2.10.0-r1
Wolfi opensearch-2-reporting 0 2.10.0-r1
Wolfi opensearch-2-repository-azure 0 2.10.0-r1
Wolfi opensearch-2-repository-gcs 0 2.10.0-r1
Wolfi opensearch-2-repository-s3 0 2.10.0-r1
Wolfi opensearch-2-security 0 2.10.0-r1
Wolfi opensearch-2-security-analytics 0 2.10.0-r1
Wolfi opensearch-2-sql 0 2.10.0-r1
Wolfi opensearch-2-store-smb 0 2.10.0-r1
Wolfi opensearch-2-telemetry-otel 0 2.10.0-r1
Wolfi opensearch-2-transport-nio 0 2.10.0-r1
Wolfi trino 0 444-r0
Wolfi trino-config 0 444-r0
Wolfi trino-oci-entrypoint 0 444-r0
Wolfi trino-plugin-accumulo 0 444-r0
Wolfi trino-plugin-ai-functions 0 444-r0
Wolfi trino-plugin-atop 0 444-r0
Wolfi trino-plugin-bigquery 0 444-r0
Wolfi trino-plugin-blackhole 0 444-r0
Wolfi trino-plugin-cassandra 0 444-r0
Wolfi trino-plugin-clickhouse 0 444-r0
Wolfi trino-plugin-delta-lake 0 444-r0
Wolfi trino-plugin-druid 0 444-r0
Wolfi trino-plugin-duckdb 0 444-r0
Wolfi trino-plugin-elasticsearch 0 444-r0
Wolfi trino-plugin-example-http 0 444-r0
Wolfi trino-plugin-exasol 0 444-r0
Wolfi trino-plugin-exchange-filesystem 0 444-r0
Wolfi trino-plugin-exchange-hdfs 0 444-r0
Wolfi trino-plugin-faker 0 444-r0
Wolfi trino-plugin-functions-python 0 444-r0
Wolfi trino-plugin-geospatial 0 444-r0
Wolfi trino-plugin-google-sheets 0 444-r0
Wolfi trino-plugin-hive 0 444-r0
Wolfi trino-plugin-http-event-listener 0 444-r0
Wolfi trino-plugin-http-server-event-listener 0 444-r0
Wolfi trino-plugin-hudi 0 444-r0
Wolfi trino-plugin-iceberg 0 444-r0
Wolfi trino-plugin-ignite 0 444-r0
Wolfi trino-plugin-jmx 0 444-r0
Wolfi trino-plugin-kafka 0 444-r0
Wolfi trino-plugin-kafka-event-listener 0 444-r0
Wolfi trino-plugin-kinesis 0 444-r0
Wolfi trino-plugin-kudu 0 444-r0
Wolfi trino-plugin-lakehouse 0 444-r0

Related vulnerabilities