Directory Traversal Affecting perl-Archive-Tar package, versions <0:3.04-522.amzn2023.0.3


Severity

Recommended
high

Based on Amazon Linux security rating.

Threat Intelligence

EPSS
0.46% (40th 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 IDSNYK-AMZN2023-PERLARCHIVETAR-17290591
  • published10 Jun 2026
  • disclosed26 May 2026

Introduced: 26 May 2026

CVE-2026-42497  (opens in a new tab)
CWE-22  (opens in a new tab)

How to fix?

Upgrade Amazon-Linux:2023 perl-Archive-Tar to version 0:3.04-522.amzn2023.0.3 or higher.
This issue was patched in ALAS2023-2026-1805.

NVD Description

Note: Versions mentioned in the description apply only to the upstream perl-Archive-Tar package and not the perl-Archive-Tar package as distributed by Amazon-Linux. See How to fix? for Amazon-Linux:2023 relevant fixed versions and status.

Archive::Tar versions before 3.08 for Perl extract hardlinks to attacker controlled paths outside the extraction directory.

_make_special_file() passes the tar header's linkname to link() without validating it against absolute paths or .. segments, creating a hardlink that shares the victim file's inode.

A subsequent write through the extracted name modifies the victim file, and the post-extraction chmod, chown, and utime block in _extract_file() (guarded only against symlinks via -l) applies the tar header's mode, owner, and timestamps to the shared inode during extraction alone.

CVSS Base Scores

version 3.1