CVE-2026-42497Archive::Tar versions before 3.08 for Perl extract hardlinks to attacker controlled…
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.
What to do
Fixed builds are available from Alpine, Debian, Ubuntu: see the table below for the fixed version per release.
Red Hat, Ubuntu have not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.10 | perl | Fix pending | UBUNTU-CVE-2026-42497 | |
| Ubuntu 26.04 | perl | Not affected vulnerable_code_not_present | ||
| Ubuntu 25.10 | perl | Will not fix same patch of CVE-2026-42496 | UBUNTU-CVE-2026-42497 | |
| Ubuntu 24.04 | perl | Fixed | 5.38.2-3.2ubuntu0.3 | UBUNTU-CVE-2026-42497 |
| Ubuntu 22.04 | perl | Not affected vulnerable_code_not_present | ||
| Ubuntu 20.04 | perl | Fix pending | UBUNTU-CVE-2026-42497 | |
| Ubuntu 18.04 | perl | Fix pending | UBUNTU-CVE-2026-42497 | |
| Ubuntu 16.04 | perl | Fix pending | UBUNTU-CVE-2026-42497 | |
| Ubuntu 14.04 | perl | Fix pending | UBUNTU-CVE-2026-42497 | |
| Debian 14 | perl | Fixed | 5.42.3-1 | DEBIAN-CVE-2026-42497 |
| Debian 13 | perl | Fixed | 5.40.1-6+deb13u1 | DEBIAN-CVE-2026-42497 |
| Debian 12 | perl | Fixed | 5.36.0-7+deb12u4 | DEBIAN-CVE-2026-42497 |
| Red Hat Enterprise Linux 10 | perl-Archive-Tar | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 9 | perl-Archive-Tar | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 8 | perl-Archive-Tar | Fix pending Fix deferred | ||
| Red Hat Enterprise Linux 7 | perl-Archive-Tar | Will not fix Out of support scope | ||
| Alpine Linux 3.24 | perl | Fixed | 5.42.3-r0 | ALPINE-CVE-2026-42497 |
What the vendor says
As published in the CVE record by CPANSec, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.
- BINGOS Archive::Tar: affected: before 3.08; fixed in
3.08
Solution: Upgrade to Archive::Tar 3.08 or later.
Vendor advisories:
- https://github.com/jib/archive-tar-new/commit/17c873492a05eddc0de18c1485e0b2cccd5a9158.pa… (patch)
- https://metacpan.org/release/BINGOS/Archive-Tar-3.08/changes (release-notes)
References
- https://github.com/jib/archive-tar-new/commit/17c873492a05eddc0de18c1485e0b2cccd5a9158.patch
- https://metacpan.org/release/BINGOS/Archive-Tar-3.08/changes
- https://www.cve.org/CVERecord?id=CVE-2026-42496
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.