Archive::Tar versions before 3.08 for Perl extract hardlinks to attacker controlled paths outside the extraction directory
Published May 26, 2026
7.5
HIGHCVSS 3.1
EPSS 0.47%
Description
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.
Affected products
-
Affected
- ≥ 0, < 3.08
Default status is the baseline for the product. Each version can override it (patched versions can be marked unaffected).
| Vendor | Product | Default status | Versions |
|---|---|---|---|
| Bingos | Archive::Tar | unaffected | Affected
|
No data.
Red Hat Enterprise Linux 10
perl-Archive-Tar
Fix deferred
Red Hat Enterprise Linux 7
perl-Archive-Tar
Out of support scope
Red Hat Enterprise Linux 8
perl-Archive-Tar
Fix deferred
Red Hat Enterprise Linux 8
perl:5.32/perl-Archive-Tar
Fix deferred
Red Hat Enterprise Linux 9
perl-Archive-Tar
Fix deferred
| Product | Package | State | Advisory |
|---|---|---|---|
| Red Hat Enterprise Linux 10 | perl-Archive-Tar | Fix deferred | n/a |
| Red Hat Enterprise Linux 7 | perl-Archive-Tar | Out of support scope | n/a |
| Red Hat Enterprise Linux 8 | perl-Archive-Tar | Fix deferred | n/a |
| Red Hat Enterprise Linux 8 | perl:5.32/perl-Archive-Tar | Fix deferred | n/a |
| Red Hat Enterprise Linux 9 | perl-Archive-Tar | Fix deferred | n/a |
No package ranges for this CVE.
Remediation
Vendor solution
Upgrade to Archive::Tar 3.08 or later.
Red Hat statement
This Moderate impact vulnerability in `perl-Archive-Tar` allows an attacker to modify arbitrary files on the system. By crafting a malicious tar archive, an attacker can exploit a path traversal flaw during extraction to create hardlinks outside the intended directory. This could lead to data corruption or unauthorized changes to sensitive system files if a user extracts a specially crafted archive.
References (8)
- https://access.redhat.com/security/cve/CVE-2026-42497 Vendor Advisory
- https://bugzilla.redhat.com/show_bug.cgi?id=2481317 Issue Tracking
- https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-31777 Advisory
- https://github.com/jib/archive-tar-new/commit/17c873492a05eddc0de18c1485e0b2cccd5a9158.patch patch
- https://metacpan.org/release/BINGOS/Archive-Tar-3.08/changes release-notesRelease Notes
- https://nvd.nist.gov/vuln/detail/CVE-2026-42497
- https://www.cve.org/CVERecord?id=CVE-2026-42496 relatedThird Party Advisory
- https://www.cve.org/CVERecord?id=CVE-2026-42497
| Link | Providers | Tags |
|---|---|---|
| https://access.redhat.com/security/cve/CVE-2026-42497 | Vendor Advisory | |
| https://bugzilla.redhat.com/show_bug.cgi?id=2481317 | Issue Tracking | |
| https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-31777 | Advisory | |
| https://github.com/jib/archive-tar-new/commit/17c873492a05eddc0de18c1485e0b2cccd5a9158.patch | patch | |
| https://metacpan.org/release/BINGOS/Archive-Tar-3.08/changes | release-notesRelease Notes | |
| https://nvd.nist.gov/vuln/detail/CVE-2026-42497 | ||
| https://www.cve.org/CVERecord?id=CVE-2026-42496 | relatedThird Party Advisory | |
| https://www.cve.org/CVERecord?id=CVE-2026-42497 |
Change history (0)
No recorded changes yet.
CVE.org / MITRE
CISA Vulnrichment
GitHub
No data