Every CVE Search/ Get API key

CVE-2021-33645

The th_read() function doesn’t free a variable t->th_buf.gnu_longlink after allocating memory,...

7.5 HighFix available

The th_read() function doesn’t free a variable t->th_buf.gnu_longlink after allocating memory, which may cause a memory leak.

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
None
Integrity
None
Availability
High

Exploit likelihood

2.02%Up 1.1 points since Aug 10, 2022
90%50%10%1%

What each source reports

NVD Score used 7.5

The th_read() function doesn’t free a variable t->th_buf.gnu_longlink after allocating memory, which may cause a memory leak.

Record
CVE-2021-33645
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness
CWE-401
Updated
2026-11-02
CVE List No score

The th_read() function doesn’t free a variable t->th_buf.gnu_longlink after allocating memory, which may cause a memory leak.

Record
CVE-2021-33645
Weakness
CWE-401
Updated
2026-11-02
EUVDEUVD-2021-20322 No score

The th_read() function doesn’t free a variable t->th_buf.gnu_longlink after allocating memory, which may cause a memory leak.

Record
EUVD-2021-20322
Updated
2026-11-02
GitHub AdvisoriesGHSA-j8q5-rwmr-9hg8 7.5

The th_read() function doesn’t free a variable t->th_buf.gnu_longlink after allocating memory,...

The th_read() function doesn’t free a variable t->th_buf.gnu_longlink after allocating memory, which may cause a memory leak.

Record
GHSA-j8q5-rwmr-9hg8
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness
CWE-401
Updated
2026-11-02
OSVAZL-10544 7.5

CVE-2021-33645 affecting package libtar for versions less than 1.2.20-10

The th_read() function doesn’t free a variable t->th_buf.gnu_longlink after allocating memory, which may cause a memory leak.

Record
AZL-10544
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSVAZL-34948 7.5

CVE-2021-33645 affecting package libtar for versions less than 1.2.20-11

The th_read() function doesn’t free a variable t->th_buf.gnu_longlink after allocating memory, which may cause a memory leak.

Record
AZL-34948
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-05
Show 10 moreShow less
OSV 7.5

The th_read() function doesn’t free a variable t->th_buf.gnu_longlink after allocating memory, which may cause a memory leak.

Record
CVE-2021-33645
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSVDEBIAN-CVE-2021-33645 7.5

The th_read() function doesn’t free a variable t->th_buf.gnu_longlink after allocating memory, which may cause a memory leak.

Record
DEBIAN-CVE-2021-33645
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/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 MediumCVSS: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 HighCVSS: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 HighCVSS: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-33645 7.5

The th_read() function doesn’t free a variable t->th_buf.gnu_longlink after allocating memory, which may cause a memory leak.

Record
UBUNTU-CVE-2021-33645
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
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

Affected packages
PackageAffectedFixed
libtar
AlmaLinux:8
From an advisory covering 4 CVEs
before 1.2.20-17.el8
1.2.20-17.el8
libtar
Azure Linux:2
before 1.2.20-10
1.2.20-10
libtar
Azure Linux:3
before 1.2.20-11
1.2.20-11
libtar
Debian:12
before 1.2.20-8+deb12u1, plus listed versions
1.2.20-81.2.20-8+deb12u1~deb11u1
1.2.20-8+deb12u1
libtar
Debian: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
libtar
Mageia:8
From an advisory covering 4 CVEs
before 1.2.20-9.1.mga8
1.2.20-9.1.mga8
libtar
openEuler:20.03-LTS-SP1
From an advisory covering 4 CVEs
before 1.2.20-19.oe1
1.2.20-19.oe1
libtar
openEuler:20.03-LTS-SP3
From an advisory covering 4 CVEs
before 1.2.20-19.oe1
1.2.20-19.oe1
libtar
openEuler:22.03-LTS
From an advisory covering 4 CVEs
before 1.2.20-21.oe2203
1.2.20-21.oe2203
libtar
Red 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
Affected packages
PackageAffectedFixed
libtar-debuginfo
Red 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-debugsource
Red 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
Rocky Linux:8
From an advisory covering 4 CVEs
before 0:1.2.20-17.el8
0:1.2.20-17.el8
libtar
Ubuntu:Pro:16.04:LTS
before 1.2.20-4ubuntu0.1~esm1, plus listed versions
1.2.20-4
1.2.20-4ubuntu0.1~esm1
libtar
Ubuntu:Pro:18.04:LTS
before 1.2.20-7ubuntu0.1~esm1, plus listed versions
1.2.20-7
1.2.20-7ubuntu0.1~esm1
libtar
Ubuntu: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
libtar
Ubuntu: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
libtar
Ubuntu: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
libtar
Ubuntu: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
libtar
Ubuntu: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
libtar
Ubuntu: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
libtar
Ubuntu: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
libtar
Ubuntu: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
libtar
openSUSE:Tumbleweed
From an advisory covering 3 CVEs
before 1.2.20-3.1
1.2.20-3.1

History

History
RecordedChangedSources
affected
factsOSV
first indexedCVE List, EUVD, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2021-33645 is a high vulnerability (CVSS 7.5) 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 2.02%, the 81st percentile. Fixed in libtar 1.2.20-10.

References

Show 45 moreShow less
MoveEnter Open