# CVE-2021-20193: Out-of-bounds Read and Missing Release of Memory after Effective Lifetime in tar

> An attacker can cause a denial of service by submitting a crafted file to tar, leading to uncontrolled memory consumption.

- **Severity:** Low 3.3 (`CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:N/I:N/A:L`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Local or same network only
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 26 Mar 2021
- **Updated:** 14 Oct 2026
- **Also known as:** ALPINE-CVE-2021-20193, DEBIAN-CVE-2021-20193, GHSA-mwq4-jmcc-2cx4, JLSEC-2026-183, MGASA-2021-0233, OESA-2021-1173, SUSE-SU-2021:0974-1, SUSE-SU-2021:0975-1, UBUNTU-CVE-2021-20193, USN-5329-1, openSUSE-SU-2021:0494-1, openSUSE-SU-2024:11620-1

## What is CVE-2021-20193?

CVE-2021-20193 is a low-severity denial of service vulnerability in tar, published on 26 Mar 2021. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

### Official description

A flaw was found in the src/list.c of tar 1.33 and earlier. This flaw allows an attacker who can submit a crafted input file to tar to cause uncontrolled consumption of memory. The highest threat from this vulnerability is to system availability.

Weakness: CWE-125 (Out-of-bounds Read), CWE-401 (Missing Release of Memory after Effective Lifetime)

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

It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `tar` | SUSE:Linux Enterprise Micro 5.0 | All versions | 1.30-3.6.1 |
| `tar` | SUSE:Linux Enterprise Module for Basesystem 15 SP2 | All versions | 1.30-3.6.1 |
| `tar` | SUSE:Linux Enterprise Server 12 SP5 | All versions | 1.27.1-15.9.1 |
| `tar` | SUSE:Linux Enterprise Server for SAP Applications 12 SP5 | All versions | 1.27.1-15.9.1 |
| `tar` | openSUSE:Leap 15.2 | All versions | 1.30-lp152.4.3.1 |
| `tar` | openSUSE:Tumbleweed | All versions | 1.34-5.1 |

Products: Gnu Tar.

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

Apply the vendor's patch.

## Is CVE-2021-20193 being exploited?

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

## Other vulnerabilities in tar

- [CVE-2005-2541](https://insights.sbomify.com/CVE-2005-2541/): Privilege escalation in n/a (critical 10.0)
- [CVE-2019-9923](https://insights.sbomify.com/CVE-2019-9923/): Null dereference in n/a (high 7.5)
- [CVE-2016-6321](https://insights.sbomify.com/CVE-2016-6321/): Path traversal in n/a (high 7.5)
- [CVE-2007-4131](https://insights.sbomify.com/CVE-2007-4131/): Path traversal in n/a (medium 6.8)
- [CVE-2023-39804](https://insights.sbomify.com/CVE-2023-39804/): Denial of service in n/a (medium 6.2)

## Fix prompt for AI coding agents

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

What it is: CVE-2021-20193 is a low-severity denial of service vulnerability in tar, published on 26 Mar 2021. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2021-20193 in the wild and no public exploit code.

Affected product: tar. No package-level version data is available, so check the vendor advisory linked from the reference page.

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-20193/ (Markdown: https://insights.sbomify.com/CVE-2021-20193/index.md)
```

## Sources

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

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