oss-sec mailing list archives

CVE-2021-35516: Apache Commons Compress 1.6 to 1.20 denial of service vulnerability


From: Stefan Bodewig <bodewig () apache org>
Date: Tue, 13 Jul 2021 04:01:04 +0000

Severity: low

Description:

When reading a specially crafted 7Z 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' sevenz package.


This issue is being tracked as COMPRESS-542

Mitigation:

Commons Compress users should upgrade to 1.21 or later.

With Compress 1.19 we introduced a feature that tries to recover broken 7z archives, which makes it far easier to 
exploit this weakness. As a result we have disabled the recovery code by default and users need to enable it 
explicitly. In addition users are able to control the amount of memory SevenZFile may use and we strongly recommend 
using this feature when trying to recover broken archives.


Credit:

This issue was first reported to the project's issue tracker as COMPRESS-542 by Robin Schimpf. Later OSS Fuzz detected 
ways to exploit this issue which managed to escape the initial attempt to fix it.

References:

https://commons.apache.org/proper/commons-compress/security-reports.html


Current thread: