Skip to main content
Mallory
HighPublic exploitVulnerability

CVE-2021-33644: Out-of-bounds read in libtar GNU long-name processing

Published Aug 9, 2022 · Updated 14 days ago
Trending this weekNot trendingOutside this week’s top 100
Mention activity · 30 days2 mentions · peak 2 in a dayToday
CVSS8.1High · v3.1
EPSS1.6%76th percentile
CISA KEVNoNot listed
In the wildNonePublic exploit, no exploitation reported
Vendors
Fedora ProjectFeepOpenatom
IdentifiersCVE-2021-33644CWE-125 · Out-of-bounds Read

CVE-2021-33644 is an out-of-bounds read vulnerability in libtar triggered by a crafted tar archive containing a GNU long-name record with a zero-size header. Processing the record can cause malloc(0) to be called for the gnu_longname buffer, followed by an out-of-bounds read. A subsequent investigation identified an incomplete-fix issue affecting both GNU long-name and long-link records: rejecting zero-size records does not ensure NUL termination of nonzero buffers. Records with a positive size divisible by 512 and no NUL bytes can cause safer_name_suffix() to read beyond the allocation. This follow-up issue was confirmed in Debian package version 1.2.20-8+deb12u1 and had a separate CVE identifier pending as of November 4, 2026.

Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Analyst brief

Impact, mitigation & remediation

What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Processing a malicious archive can compromise application availability and confidentiality through out-of-bounds memory reads. For the incomplete-fix issue, a heap-buffer-overflow read was demonstrated, with potential application crashes and disclosure of adjacent heap data through returned path strings. No out-of-bounds write was identified in that investigation. The supplied CVSS assessment for CVE-2021-33644 rates confidentiality and availability impact as high and integrity impact as none.

Mitigation

If you can’t patch tonight, do this now.

Avoid processing untrusted tar archives with affected libtar applications until the relevant fixes are verified. If archive processing is unavoidable, isolate the application with minimal privileges, restrict its access to sensitive data, and apply resource limits to reduce the consequences of memory disclosure or crashes.

Remediation

Patch, then assume compromise.

Apply the vendor update addressing CVE-2021-33644 and verify that zero-size GNU long-name and long-link records are rejected. To address the separately reported incomplete-fix issue, also apply a correction that allocates an additional byte for both buffers and explicitly appends a NUL terminator after reading archive data. A proposed patch is available, but no released version incorporating the complete correction is established. Debian package version 1.2.20-8+deb12u1 was confirmed to retain the follow-up vulnerability.

Public exploits

Exploits

2 exploits validated by Mallory's analysis.

View more in app →
libtar-CVE-2021-33644-followupThis standalone seven-file repository contains three documentation files, a remediation patch, a C configuration header, a Python archive generator, and a C proof-of-fault consumer. It is not framework-based. The code files are Python and C, with a shell script embedded in the generated archive and additional shell build instructions in the documentation. The generator builds a valid-checksum, six-block tar archive. Its GNU long-name record declares 512 bytes and supplies exactly 512 nonzero bytes. Vulnerable libtar allocates and fills a 512-byte buffer without ensuring a trailing NUL. The consumer opens the archive with default options, reads its header, and calls th_get_pathname(), causing safer_name_suffix() to scan beyond that allocation. A subsequent strlen() also relies on valid termination. The documentation describes the analogous GNU long-link weakness, but the supplied generator exercises only the long-name branch. The demonstrated capability is an out-of-bounds read and potential denial of service. Adjacent heap information could be exposed by applications that display or log the returned pathname, but the supplied harness only prints its length. The shell-script member is not extracted or executed, so its marker-writing commands do not demonstrate code execution. No network activity or exfiltration mechanism appears in the exploit programs. The patch adds an extra allocation byte and a trailing NUL for both GNU long-name and long-link buffers, alongside zero-size checks and adjusted allocation bounds. The advisory reports successful AddressSanitizer reproduction and mitigation; these claims were not independently executed during this analysis. The two listed CVEs identify the earlier fixes this work revisits; the advisory says the follow-up issue had no assigned CVE as of 2026-11-03. Repository URL, git reference, and archive size were not supplied; empty metadata and size 0 indicate unavailable information.nilondal · Disclosed Nov 4, 2026 · python · c · fileOperationallibtar-CVE-2021-33644-followupThis standalone repository contains seven files: two top-level advisory documents, a remediation patch, reproduction instructions, a C configuration header, a Python archive generator, and a C crash harness. The three source/header files use Python and C, with an additional shell script embedded as archive content. No exploit framework, network communication, callback address, or exfiltration endpoint is present. The flaw is missing NUL termination in libtar's GNU long-name and long-link buffers. lib/block.c allocates a whole number of 512-byte blocks and fills the allocation with archive data. A positive, block-aligned record containing no NUL bytes leaves the buffer unterminated. Subsequent C-string processing, including safer_name_suffix() in lib/decode.c, can read beyond the allocation. The supplied generator exercises the long-name ('L') case; the advisory and patch also cover the analogous long-link ('K') case. poc/make_archive.py produces a 3,072-byte archive consisting of six 512-byte blocks: an extension header, a non-NUL long-name block, a regular member header, one member-data block, and two EOF blocks. This is more precise than the documentation's shorthand description of a three-block archive. poc/poc_crash.c opens the archive, reads its first logical member, resolves the pathname, and prints its length. It neither extracts files nor runs the embedded shell script. The demonstrated capability is an invalid heap read, with potential denial of service and conditional information exposure; there is no demonstrated out-of-bounds write, arbitrary code execution, or controlled heap-data disclosure. The supplied patch adds one allocation byte, appends a terminator after reading each complete long-name/long-link buffer, rejects zero-size records, and adjusts allocation bounds. A caveat is that the shown per-block DEBUG printf("%s", ptr) remains before the new final terminator assignment, so debug-build printing warrants separate review. The documents identify this as an incomplete fix related to CVE-2021-33643 and CVE-2021-33644, rather than a newly assigned instance of either identifier. They report that a separate CVE request was pending as of November 3, 2026, and claim confirmation against Debian libtar 1.2.20-8+deb12u1. These runtime and disclosure claims were not independently verified. The original repository URL, analyzed revision, and archive size were not provided; empty strings and zero represent unavailable repository metadata.nicklondal · Disclosed Nov 4, 2026 · python · c · filePoC
Exposure surface

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
Fedora ProjectFedoraoperating_system
FeepLibtarapplication
OpenatomOpeneuleroperating_system
FAQ

Frequently asked questions

Is CVE-2021-33644 exploited in the wild?
As of Nov 4, 2026, Mallory has no reports of CVE-2021-33644 being exploited in the wild. It is not listed in CISA KEV.
Is there a public exploit for CVE-2021-33644?
Yes. Mallory tracks 2 public exploits or proofs of concept for CVE-2021-33644, the earliest disclosed Nov 4, 2026.
Is there a patch for CVE-2021-33644?
Apply the vendor update addressing CVE-2021-33644 and verify that zero-size GNU long-name and long-link records are rejected. To address the separately reported incomplete-fix issue, also apply a correction that allocates an additional byte for both buffers and explicitly appends a NUL terminator after reading archive data.
What products are affected by CVE-2021-33644?
Feep Libtar, Fedora Project Fedora, and Openatom Openeuler.
How severe is CVE-2021-33644?
CVE-2021-33644 has a CVSS v3.1 score of 8.1 (High) and an EPSS score of 1.6% (76th percentile) as of Nov 4, 2026.
Activity feed

Recent activity

3 sources tracked across advisories, community write-ups, and news. New activity surfaces here as Mallory finds it.

View more in app →
Do you run this?See affected versions in your environment and whether adversaries are exploiting this vulnerability against assets like yours.
Check your exposure
Mallory platform

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, and which detections to deploy tonight.
Exposure mappingQuery your assets running an affected version, and investigate the blast radius.
Threat actor evidenceEvery report linking this CVE to a named adversary.
Associated malwareMalware families linked to this CVE, with evidence and IOCs.
Detection signaturesYARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.
Vendor-by-vendor mappingCross-references every affected SKU, including bundled OEM variants.
Social activity2Community discussion across Reddit, Mastodon, and other social sources.