Memory Leak Affecting libtar package, versions <1.2.20-7ubuntu0.1~esm1


Severity

Recommended
low

Based on Ubuntu security rating.

Threat Intelligence

EPSS
0.17% (39th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Memory Leak vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-UBUNTU1804-LIBTAR-2980490
  • published2 May 2025
  • disclosed10 Aug 2022

Introduced: 10 Aug 2022

CVE-2021-33646  (opens in a new tab)
CWE-401  (opens in a new tab)

How to fix?

Upgrade Ubuntu:18.04 libtar to version 1.2.20-7ubuntu0.1~esm1 or higher.

NVD Description

Note: Versions mentioned in the description apply only to the upstream libtar package and not the libtar package as distributed by Ubuntu. See How to fix? for Ubuntu:18.04 relevant fixed versions and status.

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

CVSS Base Scores

version 3.1