Denial of Service Vulnerability in libcommons-compress-java: Memory Allocation Issue

libcommons-compress-java Updated 02 Oct 2025

Summary

13/07/2021
N/A
No i
High
7.5

CVE-2021-35517: 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. Affects libcommons-compress-java versions >= 9ee24a3d6a84c7e09abb5a9b4940bc91e2ab23d6, <= f7503adfbad8b44eb079d564f2784aeaa034647c. No fix is published. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

Background

libcommons-compress-java is a Java library that provides support for reading and writing various compression formats, including TAR archives. It is widely used in applications that require file compression and decompression functionalities. However, this library has a vulnerability that can lead to excessive memory allocation when processing specially crafted TAR files, potentially causing applications to crash or become unresponsive.

Vulnerability Detail

The vulnerability, identified as CVE-2021-35517, arises when the Compress library processes a specially crafted TAR archive. This can lead to the allocation of large amounts of memory, resulting in an out-of-memory error even with small inputs. The potential ramifications include denial of service attacks against services utilizing the Compress library's TAR package, making it a critical issue for applications relying on this library.

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Workaround

If an immediate update is not feasible, consider implementing input validation to restrict the types of TAR files that can be processed by the application. This may involve checking the size and structure of the TAR files before processing them.

Conclusion

CVE-2021-35517 is a significant vulnerability in the libcommons-compress-java library that can lead to denial of service attacks through excessive memory allocation. It is crucial for users of this library to update to the latest version to mitigate the risk. Additionally, implementing input validation can serve as a temporary workaround.

See every vulnerability recorded for libcommons-compress-java →

Share this vulnerability

FAQ

CVE-2021-35517 is a vulnerability in the libcommons-compress-java library that allows for denial of service attacks due to excessive memory allocation when processing specially crafted TAR files.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without requiring any signup.

The CVSS score for CVE-2021-35517 is 7.5, indicating a high severity level.

The primary impact is a denial of service, where applications may crash or become unresponsive due to excessive memory usage when processing malicious TAR files.

Yes, updating to version 1.21-1 or later of libcommons-compress-java addresses this vulnerability.

Related vulnerabilities

Recent vulnerabilities recorded for libcommons-compress-java.

Sponsored Lume, the Habilume companion Habilume Habit tracker with a companion that grows with you Complete habits, earn Lume Points, and watch your Lume grow as you stay consistent. App Store Google Play

How To Fix

No fixed version is published for this vulnerability.

Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback