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

> Attackers can cause denial of service by providing crafted 7Z archives that trigger excessive memory allocation in Apache Commons Compress.

- **Severity:** High 7.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 13 Jul 2021
- **Updated:** 4 Aug 2024
- **Also known as:** AZL-45144, DEBIAN-CVE-2021-35516, GHSA-crv7-7245-f45f, MINI-v4p2-fwr3-898r, ROOT-APP-MAVEN-CVE-2021-35516, UBUNTU-CVE-2021-35516

## What is CVE-2021-35516?

CVE-2021-35516 is a high-severity denial of service vulnerability in Netapp Active Iq Unified Manager, published on 13 Jul 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official 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.

Weakness: CWE-770 (Allocation of Resources Without Limits or Throttling), CWE-130 (Improper Handling of Length Parameter Inconsistency)

## Which versions are affected by CVE-2021-35516?

2 open source packages ship an affected version, including org.apache.commons:commons-compress. It affects 24 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `org.apache.commons:commons-compress` | Maven | All versions | 1.21 |
| `org.apache.commons:commons-compress` | Maven | All versions | 1.21 |

Products: Apache Commons Compress, Netapp Active Iq Unified Manager, Netapp Oncommand Insight, Oracle Banking Digital Experience, Oracle Banking Enterprise Default Management, Oracle Banking Party Management, Oracle Business Process Management Suite, Oracle Commerce Guided Search, Oracle Communications Billing and Revenue Management, Oracle Communications Cloud Native Core Automated Test Suite, Oracle Communications Cloud Native Core Service Communication Proxy, Oracle Communications Cloud Native Core Unified Data Repository, Oracle Communications Diameter Intelligence Hub, Oracle Communications Messaging Server, Oracle Communications Session Route Manager, Oracle Financial Services Crime and Compliance Management Studio, Oracle Financial Services Enterprise Case Management, Oracle Flexcube Universal Banking, Oracle Healthcare Data Repository, Oracle Insurance Policy Administration and 4 more.

## How do I fix CVE-2021-35516?

Upgrade org.apache.commons:commons-compress to 1.21 or later.

## Is CVE-2021-35516 being exploited?

There is no known exploitation of CVE-2021-35516 in the wild and no public exploit code.

## Other vulnerabilities in Netapp Active Iq Unified Manager

- [CVE-2024-25710](https://insights.sbomify.com/CVE-2024-25710/): Apache Commons Compress: Denial of service caused by an infinite loop for a corrupted DUMP file (high 8.1)
- [CVE-2021-35515](https://insights.sbomify.com/CVE-2021-35515/): Apache Commons Compress 1.6 to 1.20 denial of service vulnerability (high 7.5)
- [CVE-2021-35517](https://insights.sbomify.com/CVE-2021-35517/): Apache Commons Compress 1.1 to 1.20 denial of service vulnerability (high 7.5)
- [CVE-2021-36090](https://insights.sbomify.com/CVE-2021-36090/): Apache Commons Compress 1.0 to 1.20 denial of service vulnerability (high 7.5)
- [CVE-2019-12402](https://insights.sbomify.com/CVE-2019-12402/): Denial of Service in Apache Commons Compress (high 7.5)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2021-35516 and fix it if it is affected.

What it is: CVE-2021-35516 is a high-severity denial of service vulnerability in Netapp Active Iq Unified Manager, published on 13 Jul 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2021-35516 in the wild and no public exploit code.

Affected packages and fixed versions:
- org.apache.commons:commons-compress (Maven): affected all versions; fixed in 1.21
- org.apache.commons:commons-compress (Maven): affected all versions; fixed in 1.21

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2021-35516/ (Markdown: https://insights.sbomify.com/CVE-2021-35516/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2021-35516
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2021-35516
- OSV: https://osv.dev/vulnerability/CVE-2021-35516

---
From sbomify Insights: https://insights.sbomify.com/CVE-2021-35516/
Summaries are generated and may contain mistakes; the official description above is the record.
