Archive::Tar versions before 3.10 for Perl contain a memory exhaustion vulnerability. The _read_tar() function reads each entry's payload using $handle->read($$data, $block), where $block is derived from the entry's 12-byte size field in the tar header without an upper bound. A crafted tar header declaring a multi-gigabyte size causes Perl to allocate a scalar of that size, leading to memory exhaustion. The vulnerability was published on 2026-05-26 and last modified on 2026-05-26. The issue is classified under CWE-789 (Uncontrolled Memory Allocation). A patch is available in version 3.10.
Archive::Tar versions before 3.08 for Perl are vulnerable to a path traversal via hardlink extraction. The _make_special_file() function passes the tar header's linkname directly to link() without validating against absolute paths or directory traversal sequences (..). This allows creation of a hardlink to an attacker-controlled path outside the extraction directory, sharing the inode of a victim file. Subsequent writes through the extracted filename modify the victim file, and the post-extraction chmod, chown, and utime operations in _extract_file()—which are guarded only against symlinks via -l—apply the tar header's mode, owner, and timestamps to the shared inode during extraction. The vulnerability was published on 2026-05-26 and last modified on 2026-05-26.
Archive::Tar before 3.08 for Perl extracts symbolic links with attacker-controlled targets outside the extraction directory. The _make_special_file() function passes the tar header's linkname directly to symlink() without validating against absolute paths or directory traversal sequences. The secure-extract mode that guards regular file extraction does not apply to symlink targets. A subsequent open operation through the extracted symlink name can read from or write to an attacker-chosen path.