VYPR
High severityNVD Advisory· Published Jul 13, 2021· Updated Aug 4, 2024

Apache Commons Compress 1.1 to 1.20 denial of service vulnerability

CVE-2021-35517

Description

When reading a specially crafted TAR archive, Compress can be made to allocate large amounts of memory that finally leads to an out of memory error even for very small inputs. This could be used to mount a denial of service attack against services that use Compress' tar package.

AI Insight

LLM-synthesized narrative grounded in this CVE's description and references.

Apache Commons Compress 1.1 to 1.20 can be forced to allocate excessive memory via a crafted TAR archive, leading to denial of service.

Vulnerability

A denial of service vulnerability exists in the tar package of Apache Commons Compress versions 1.1 through 1.20. When reading a specially crafted TAR archive, the library can be made to allocate large amounts of memory, resulting in an out-of-memory error even for very small inputs [3]. The issue is triggered during the parsing of the archive's header or entry data, where insufficient validation allows an attacker to specify an extremely large size value that forces excessive memory allocation.

Exploitation

An attacker needs only the ability to supply a malicious TAR archive to a service or application that uses Apache Commons Compress's tar package. No authentication or special privileges are required. The attacker crafts a TAR file with manipulated metadata (e.g., a file entry with an inflated size field) that, when processed by the library, causes the allocation of a disproportionately large buffer. The service then exhausts available memory and crashes or becomes unresponsive.

Impact

Successful exploitation results in a denial of service (DoS) condition. The affected service or application becomes unavailable due to an out-of-memory error. There is no impact on confidentiality or integrity; the attack solely disrupts availability.

Mitigation

Users of Apache Commons Compress should upgrade to version 1.21 or later, which contains the fix for this vulnerability [3]. For Apache Ant users, which also uses the Compress library, upgrading to Ant 1.9.16 or 1.10.11 addresses the issue in that context [2]. No workarounds are available for earlier versions; upgrading is the recommended action.

AI Insight generated on May 21, 2026. Synthesized from this CVE's description and the cited reference URLs; citations are validated against the source bundle.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
org.apache.commons:commons-compressMaven
< 1.211.21

Affected products

7

Patches

0

No patches discovered yet.

Vulnerability mechanics

AI mechanics synthesis has not run for this CVE yet.

References

38

News mentions

0

No linked articles in our index yet.