CVE-2021-33643
An attacker who submits a crafted tar file with size in header struct being 0 may be able to...
An attacker who submits a crafted tar file with size in header struct being 0 may be able to trigger an calling of malloc(0) for a variable gnu_longlink, causing an out-of-bounds read.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- None
- Availability
- High
Exploit likelihood
What each source reports
NVD Score used
9.1
An attacker who submits a crafted tar file with size in header struct being 0 may be able to trigger an calling of malloc(0) for a variable gnu_longlink, causing an out-of-bounds read.
- Record
CVE-2021-33643- CVSS 3.1
- 9.1 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H - CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L - Weakness
- CWE-125
- Updated
- 2026-11-02
CVE List
6.5
An attacker who submits a crafted tar file with size in header struct being 0 may be able to trigger an calling of malloc(0) for a variable gnu_longlink, causing an out-of-bounds read.
- Record
CVE-2021-33643- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L - Weakness
- CWE-125
- Updated
- 2026-11-02
EUVDEUVD-2021-20320
6.5
An attacker who submits a crafted tar file with size in header struct being 0 may be able to trigger an calling of malloc(0) for a variable gnu_longlink, causing an out-of-bounds read.
- Record
EUVD-2021-20320- CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-j7g9-fcw9-wxcf
9.1
An attacker who submits a crafted tar file with size in header struct being 0 may be able to...
An attacker who submits a crafted tar file with size in header struct being 0 may be able to trigger an calling of malloc(0) for a variable gnu_longlink, causing an out-of-bounds read.
- Record
GHSA-j7g9-fcw9-wxcf- CVSS 3.1
- 9.1 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H - Weakness
- CWE-125
- Updated
- 2026-11-02
OSVAZL-10542
9.1
CVE-2021-33643 affecting package libtar for versions less than 1.2.20-10
An attacker who submits a crafted tar file with size in header struct being 0 may be able to trigger an calling of malloc(0) for a variable gnu_longlink, causing an out-of-bounds read.
- Record
AZL-10542- CVSS 3.1
- 9.1 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H - Updated
- 2026-11-02
OSVAZL-34946
9.1
CVE-2021-33643 affecting package libtar for versions less than 1.2.20-11
An attacker who submits a crafted tar file with size in header struct being 0 may be able to trigger an calling of malloc(0) for a variable gnu_longlink, causing an out-of-bounds read.
- Record
AZL-34946- CVSS 3.1
- 9.1 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H - Updated
- 2026-11-05
Show 10 moreShow less
OSV
9.1
An attacker who submits a crafted tar file with size in header struct being 0 may be able to trigger an calling of malloc(0) for a variable gnu_longlink, causing an out-of-bounds read.
- Record
CVE-2021-33643- CVSS 3.1
- 9.1 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H - Updated
- 2026-11-02
OSVDEBIAN-CVE-2021-33643
9.1
An attacker who submits a crafted tar file with size in header struct being 0 may be able to trigger an calling of malloc(0) for a variable gnu_longlink, causing an out-of-bounds read.
- Record
DEBIAN-CVE-2021-33643- CVSS 3.1
- 9.1 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H - Updated
- 2026-11-02
OSVOESA-2022-1807
6.2
libtar security update
Libtar is a C library for manipulating POSIX tar files. It handles adding and extracting files to/from a tar archive. Requires gcc, make, and zlib.
Security Fix(es):
An attacker who submits a crafted tar file with size in header struct being 0 may be able to trigger an calling of malloc(0) for a variable gnu_longlink, causing an out-of-bounds read.(CVE-2021-33643)
An attacker who submits a crafted tar file with size in header struct being 0 may be able to trigger an calling of malloc(0) for a variable gnu_longname, causing an out-of-bounds read.(CVE-2021-33644)
The th_read() function doesn’t free a variable t->th_buf.gnu_longlink after allocating memory, which may cause a memory leak.(CVE-2021-33645)
The th_read() function doesn’t free a variable t->th_buf.gnu_longname after allocating memory, which may cause a memory leak.(CVE-2021-33646)
- Record
OESA-2022-1807- CVSS 3.1
- 6.2 Medium
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSVRHSA-2023:2898
7.5
Red Hat Security Advisory: libtar security update
- Record
RHSA-2023:2898- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSVRLSA-2023:2898
7.5
Moderate: libtar security update
The libtar packages contain a C library for manipulating tar archives. The library supports both the strict POSIX tar format and many of the commonly used GNU extensions.
Security Fix(es):
-
libtar: out-of-bounds read in gnu_longlink (CVE-2021-33643)
-
libtar: out-of-bounds read in gnu_longname (CVE-2021-33644)
-
libtar: memory leak found in th_read() function (CVE-2021-33645)
-
libtar: memory leak found in th_read() function (CVE-2021-33646)
For more details about the security issue(s), including the impact, a CVSS score, acknowledgments, and other related information, refer to the CVE page(s) listed in the References section.
Additional Changes:
For detailed information on changes in this release, see the Rocky Linux 8.8 Release Notes linked from the References section.
- Record
RLSA-2023:2898- CVSS 3.1
- 7.5 High
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - Updated
- 2026-11-02
OSVUBUNTU-CVE-2021-33643
9.1
An attacker who submits a crafted tar file with size in header struct being 0 may be able to trigger an calling of malloc(0) for a variable gnu_longlink, causing an out-of-bounds read.
- Record
UBUNTU-CVE-2021-33643- CVSS 3.1
- 9.1 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H - CVSS 3.1
- 6.5 Medium
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L - Updated
- 2026-11-02
OSVALSA-2023:2898 No score
Moderate: libtar security update
The libtar packages contain a C library for manipulating tar archives. The library supports both the strict POSIX tar format and many of the commonly used GNU extensions.
Security Fix(es):
- libtar: out-of-bounds read in gnu_longlink (CVE-2021-33643)
- libtar: out-of-bounds read in gnu_longname (CVE-2021-33644)
- libtar: memory leak found in th_read() function (CVE-2021-33645)
- libtar: memory leak found in th_read() function (CVE-2021-33646)
For more details about the security issue(s), including the impact, a CVSS score, acknowledgments, and other related information, refer to the CVE page(s) listed in the References section.
Additional Changes:
For detailed information on changes in this release, see the AlmaLinux Release Notes linked from the References section.
- Record
ALSA-2023:2898- Updated
- 2026-11-02
OSVMGASA-2022-0335 No score
Updated libtar packages fix security vulnerability
An attacker who submits a crafted tar file with size in header struct being 0 may be able to trigger an calling of malloc(0) for a variable gnu_longlink, causing an out-of-bounds read. (CVE-2021-33643)
An attacker who submits a crafted tar file with size in header struct being 0 may be able to trigger an calling of malloc(0) for a variable gnu_longname, causing an out-of-bounds read. (CVE-2021-33644)
The th_read() function doesn't free a variable t->th_buf.gnu_longlink after allocating memory, which may cause a memory leak. (CVE-2021-33645)
The th_read() function doesn't free a variable t->th_buf.gnu_longname after allocating memory, which may cause a memory leak. (CVE-2021-33646)
- Record
MGASA-2022-0335- Updated
- 2026-11-02
OSVopenSUSE-SU-2026:11092-1 No score
libtar-1.2.20-3.1 on GA media
These are all security issues fixed in the libtar-1.2.20-3.1 package on the GA media of openSUSE Tumbleweed.
- Record
openSUSE-SU-2026:11092-1- Updated
- 2026-11-02
OSVUSN-7398-1 No score
libtar vulnerabilities
It was discovered that libtar may perform out-of-bounds reads when processing specially crafted tar files. An attacker could possibly use this issue to cause libtar to crash, resulting in a denial of service, or execute arbitrary code. (CVE-2021-33643, CVE-2021-33644)
It was discovered that libtar contained a memory leak due to failing to free a variable, causing performance degradation. An attacker could possibly use this issue to cause libtar to crash, resulting in a denial of service. (CVE-2021-33645, CVE-2021-33646)
- Record
USN-7398-1- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
libtarAlmaLinux:8 From an advisory covering 4 CVEs |
before 1.2.20-17.el8 | 1.2.20-17.el8 |
libtarAzure Linux:2 |
before 1.2.20-10 | 1.2.20-10 |
libtarAzure Linux:3 |
before 1.2.20-11 | 1.2.20-11 |
libtarDebian:12 |
before 1.2.20-8+deb12u1, plus listed versions 1.2.20-81.2.20-8+deb12u1~deb11u1 |
1.2.20-8+deb12u1 |
libtarDebian:11 From an advisory covering 4 CVEs |
before 1.2.20-8+deb12u1~deb11u1, plus listed versions 1.2.20-8 |
1.2.20-8+deb12u1~deb11u1 |
libtarMageia:8 From an advisory covering 4 CVEs |
before 1.2.20-9.1.mga8 | 1.2.20-9.1.mga8 |
libtaropenEuler:20.03-LTS-SP1 From an advisory covering 4 CVEs |
before 1.2.20-19.oe1 | 1.2.20-19.oe1 |
libtaropenEuler:20.03-LTS-SP3 From an advisory covering 4 CVEs |
before 1.2.20-19.oe1 | 1.2.20-19.oe1 |
libtaropenEuler:22.03-LTS From an advisory covering 4 CVEs |
before 1.2.20-21.oe2203 | 1.2.20-21.oe2203 |
libtarRed Hat:enterprise_linux:8::appstream From an advisory covering 4 CVEs |
before 0:1.2.20-17.el8 | 0:1.2.20-17.el8 |
Show 14 moreShow less
| Package | Affected | Fixed |
|---|---|---|
libtar-debuginfoRed Hat:enterprise_linux:8::appstream From an advisory covering 4 CVEs |
before 0:1.2.20-17.el8 | 0:1.2.20-17.el8 |
libtar-debugsourceRed Hat:enterprise_linux:8::appstream From an advisory covering 4 CVEs |
before 0:1.2.20-17.el8 | 0:1.2.20-17.el8 |
libtarRocky Linux:8 From an advisory covering 4 CVEs |
before 0:1.2.20-17.el8 | 0:1.2.20-17.el8 |
libtarUbuntu:Pro:16.04:LTS |
before 1.2.20-4ubuntu0.1~esm1, plus listed versions 1.2.20-4 |
1.2.20-4ubuntu0.1~esm1 |
libtarUbuntu:Pro:18.04:LTS |
before 1.2.20-7ubuntu0.1~esm1, plus listed versions 1.2.20-7 |
1.2.20-7ubuntu0.1~esm1 |
libtarUbuntu:20.04:LTS |
before 1.2.20-8ubuntu0.20.04.1, plus listed versions 1.2.20-71.2.20-8 |
1.2.20-8ubuntu0.20.04.1 |
libtarUbuntu:22.04:LTS |
before 1.2.20-8ubuntu0.22.04.1, plus listed versions 1.2.20-8 |
1.2.20-8ubuntu0.22.04.1 |
libtarUbuntu:24.04:LTS |
before 1.2.20-8.1ubuntu0.24.04.1, plus listed versions 1.2.20-81.2.20-8.11.2.20-8.1build1 |
1.2.20-8.1ubuntu0.24.04.1 |
libtarUbuntu:Pro:16.04:LTS From an advisory covering 4 CVEs |
before 1.2.20-4ubuntu0.1~esm1, plus listed versions 1.2.20-4 |
1.2.20-4ubuntu0.1~esm1 |
libtarUbuntu:Pro:18.04:LTS From an advisory covering 4 CVEs |
before 1.2.20-7ubuntu0.1~esm1, plus listed versions 1.2.20-7 |
1.2.20-7ubuntu0.1~esm1 |
libtarUbuntu:20.04:LTS From an advisory covering 4 CVEs |
before 1.2.20-8ubuntu0.20.04.1, plus listed versions 1.2.20-71.2.20-8 |
1.2.20-8ubuntu0.20.04.1 |
libtarUbuntu:22.04:LTS From an advisory covering 4 CVEs |
before 1.2.20-8ubuntu0.22.04.1, plus listed versions 1.2.20-8 |
1.2.20-8ubuntu0.22.04.1 |
libtarUbuntu:24.04:LTS From an advisory covering 4 CVEs |
before 1.2.20-8.1ubuntu0.24.04.1, plus listed versions 1.2.20-81.2.20-8.11.2.20-8.1build1 |
1.2.20-8.1ubuntu0.24.04.1 |
libtaropenSUSE:Tumbleweed From an advisory covering 3 CVEs |
before 1.2.20-3.1 | 1.2.20-3.1 |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected | ||
| facts | OSV | |
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2021-33643 is a critical vulnerability (CVSS 9.1) in Fedoraproject Fedora, published August 5, 2022. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 1.88%, the 79th percentile. Fixed in libtar 1.2.20-10.
References
openeuler.org/en/security/safety-bulletin/detail.html?id=openEuler-SA-2022-1807
lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/5YSHZY753R7XW6CIKJVAWI373WW3YRRJ
lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/OD4HEBSTI22FNYKOKK7W3X6ZQE6FV3XC
lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/7Q26QDNOJDOFYWMJWEIK5XR62M2FF6IJ
lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/4S4PJRCJLEAWN2EKXGLSOBTL7O57V7NC
lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/7WX5YE66CT7Y5C2HTHXSFDKQWYWYWJ2T
Show 45 moreShow less
lists.debian.org/debian-lts-announce/2025/01/msg00026.html
nvd.nist.gov/vuln/detail/CVE-2021-33643
lists.fedoraproject.org/archives/list/[email protected]/message/4S4PJRCJLEAWN2EKXGLSOBTL7O57V7NC
lists.fedoraproject.org/archives/list/[email protected]/message/5YSHZY753R7XW6CIKJVAWI373WW3YRRJ
lists.fedoraproject.org/archives/list/[email protected]/message/7Q26QDNOJDOFYWMJWEIK5XR62M2FF6IJ
lists.fedoraproject.org/archives/list/[email protected]/message/7WX5YE66CT7Y5C2HTHXSFDKQWYWYWJ2T
lists.fedoraproject.org/archives/list/[email protected]/message/OD4HEBSTI22FNYKOKK7W3X6ZQE6FV3XC
github.com/advisories/GHSA-j7g9-fcw9-wxcf
access.redhat.com/errata/RHSA-2023:2898
access.redhat.com/security/cve/CVE-2021-33643
access.redhat.com/security/cve/CVE-2021-33644
access.redhat.com/security/cve/CVE-2021-33645
access.redhat.com/security/cve/CVE-2021-33646
bugzilla.redhat.com/2121289
bugzilla.redhat.com/2121292
bugzilla.redhat.com/2121295
bugzilla.redhat.com/2121297
errata.almalinux.org/8/ALSA-2023-2898.html
security-tracker.debian.org/tracker/CVE-2021-33643
advisories.mageia.org/MGASA-2022-0335.html
bugs.mageia.org/show_bug.cgi?id=30821
lists.fedoraproject.org/archives/list/[email protected]/thread/OD4HEBSTI22FNYKOKK7W3X6ZQE6FV3XC
nvd.nist.gov/vuln/detail/CVE-2021-33644
nvd.nist.gov/vuln/detail/CVE-2021-33645
nvd.nist.gov/vuln/detail/CVE-2021-33646
access.redhat.com/security/updates/classification
access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/8.8_release_notes/index
bugzilla.redhat.com/show_bug.cgi?id=2121289
bugzilla.redhat.com/show_bug.cgi?id=2121292
bugzilla.redhat.com/show_bug.cgi?id=2121295
bugzilla.redhat.com/show_bug.cgi?id=2121297
security.access.redhat.com/data/csaf/v2/advisories/2023/rhsa-2023_2898.json
cve.org/CVERecord?id=CVE-2021-33643
cve.org/CVERecord?id=CVE-2021-33644
cve.org/CVERecord?id=CVE-2021-33645
cve.org/CVERecord?id=CVE-2021-33646
errata.rockylinux.org/RLSA-2023:2898
ubuntu.com/security/CVE-2021-33643
ubuntu.com/security/notices/USN-7398-1
ubuntu.com/security/CVE-2021-33644
ubuntu.com/security/CVE-2021-33645
ubuntu.com/security/CVE-2021-33646
suse.com/security/cve/CVE-2021-33640
suse.com/security/cve/CVE-2021-33643
suse.com/security/cve/CVE-2021-33645