CVE-2021-35516Apache Commons Compress 1.6 to 1.20 denial of service vulnerability
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.
What to do
Likely to be exploited: EPSS gives a 12% chance of exploitation in the next 30 days. Treat it as urgent if you run an affected version.
Fixed builds are available from Debian, Maven: see the table below for the fixed version per release.
Ubuntu has not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.10 | libcommons-compress-java | Fix pending | UBUNTU-CVE-2021-35516 | |
| Ubuntu 26.04 | libcommons-compress-java | Under investigation | UBUNTU-CVE-2021-35516 | |
| Ubuntu 25.10 | libcommons-compress-java | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2021-35516 | |
| Ubuntu 24.04 | libcommons-compress-java | Under investigation | UBUNTU-CVE-2021-35516 | |
| Ubuntu 22.04 | libcommons-compress-java | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2021-35516 | |
| Ubuntu 20.04 | libcommons-compress-java | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2021-35516 | |
| Ubuntu 18.04 | libcommons-compress-java | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2021-35516 | |
| Ubuntu 16.04 | libcommons-compress-java | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2021-35516 | |
| Ubuntu 14.04 | libcommons-compress-java | Will not fix Ubuntu decided not to fix this in this release | ||
| Debian 14 | libcommons-compress-java | Fixed | 1.21-1 | DEBIAN-CVE-2021-35516 |
| Debian 13 | libcommons-compress-java | Fixed | 1.21-1 | DEBIAN-CVE-2021-35516 |
| Debian 12 | libcommons-compress-java | Fixed | 1.21-1 | DEBIAN-CVE-2021-35516 |
| Red Hat Enterprise Linux 9 | apache-commons-compress | Not affected | ||
| Red Hat Enterprise Linux 8 | apache-commons-compress | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 8 | apache-commons-compress-javadoc | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 7 | apache-commons-compress | Will not fix Will not fix | ||
| Red Hat Enterprise Linux 7 | apache-commons-compress-javadoc | Will not fix Will not fix | ||
| Maven library | org.apache.commons:commons-compress | Fixed | 1.21 | GHSA-crv7-7245-f45f |
What the vendor says
As published in the CVE record by apache, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- Apache Software Foundation Apache Commons Compress: affected: 1.6 to before Apache Commons Compress*
Workaround: 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.
References
- https://commons.apache.org/proper/commons-compress/security-reports.html
- https://lists.apache.org/thread.html/rf68442d67eb166f4b6cf0bbbe6c7f99098c12954f37332073c9822ca%40%3Cuser.commons.apache.org%3E
- http://www.openwall.com/lists/oss-security/2021/07/13/2
- https://lists.apache.org/thread.html/rf5b1016fb15b7118b9a5e16bb0b78cb4f1dfcf7821eb137ab5757c91%40%3Cannounce.apache.org%3E
- https://lists.apache.org/thread.html/rb064d705fdfa44b5dae4c366b369ef6597951083196321773b983e71%40%3Ccommits.pulsar.apache.org%3E
- https://lists.apache.org/thread.html/rd4332baaf6debd03d60deb7ec93bee49e5fdbe958cb6800dff7fb00e%40%3Cnotifications.skywalking.apache.org%3E
- https://lists.apache.org/thread.html/rb7adf3e55359819e77230b4586521e5c6874ce5ed93384bdc14d6aee%40%3Cnotifications.skywalking.apache.org%3E
- https://lists.apache.org/thread.html/rfba19167efc785ad3561e7ef29f340d65ac8f0d897aed00e0731e742%40%3Cnotifications.skywalking.apache.org%3E
- https://lists.apache.org/thread.html/rba65ed5ddb0586f5b12598f55ec7db3633e7b7fede60466367fbf86a%40%3Cnotifications.skywalking.apache.org%3E
- https://lists.apache.org/thread.html/r9f54c0caa462267e0cc68b49f141e91432b36b23348d18c65bd0d040%40%3Cnotifications.skywalking.apache.org%3E
- https://lists.apache.org/thread.html/racd0c0381c8404f298b226cd9db2eaae965b14c9c568224aa3f437ae%40%3Cnotifications.skywalking.apache.org%3E
- https://lists.apache.org/thread.html/rb6e1fa80d34e5ada45f72655d84bfd90db0ca44ef19236a49198c88c%40%3Cnotifications.skywalking.apache.org%3E
- https://lists.apache.org/thread.html/r67ef3c07fe3b8c1b02d48012149d280ad6da8e4cec253b527520fb2b%40%3Cdev.poi.apache.org%3E
- https://www.oracle.com/security-alerts/cpuoct2021.html
- https://www.oracle.com/security-alerts/cpujan2022.html
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.