title: Apache Commons Compress 1.6 to 1.20 denial of service vulnerability
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.
problem types: CWE-130 Improper Handling of Length Parameter Inconsistency
affected:
{
product: Apache Commons Compress
vendor: Apache Software Foundation
versions:
lessThan: Apache Commons Compress*, status: affected, version: 1.6, versionType: custom
}
metrics:
other: [
content: {'other': 'low'}
type: unknown
]
workarounds: 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.