# CVE-2026-42497: Archive::Tar versions before 3.08 for Perl extract hardlinks to attacker controlled paths outside the extraction directory

CVE-2026-42497 is fixed in 7 products on 1 platform, first by libperl5.38t64 5.38.2-3.2ubuntu0.3, released May 25, 2026. It is not reported as exploited. Patch Radar priority: High.

- Web page: https://patchblox.com/security/cve/CVE-2026-42497
- Priority: High
- CVSS: 7.5 (Moderate)
- EPSS: 0.0046
- CISA KEV: not listed
- Exploited (vendor report): no
- Publicly disclosed: no
- Published: May 25, 2026
- Weakness: Improper Link Resolution Before File Access ('Link Following')
- Vendor advisory: https://msrc.microsoft.com/update-guide/vulnerability/CVE-2026-42497

## 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.

## Where it's fixed

| Platform | Product | Fixed in | Fix | Released |
|---|---|---|---|---|
| Linux | libperl5.38t64 Ubuntu 24.04.5 LTS (noble) | 5.38.2-3.2ubuntu0.3 | [libperl5.38t64 5.38.2-3.2ubuntu0.3](https://patchblox.com/security/data/fix/linux/ubuntu-noble-libperl5.38t64-5.38.2-3.2ubuntu0.3.md) | May 25, 2026 |
| Linux | perl Debian 12.15 (bookworm) | 5.36.0-7+deb12u4 | [DEBIAN-CVE-2026-42497](https://patchblox.com/security/data/fix/linux/debian-cve-2026-42497.md) | May 26, 2026 |
| Linux | perl Debian 13.5 (trixie) | 5.40.1-6+deb13u1 | [DEBIAN-CVE-2026-42497](https://patchblox.com/security/data/fix/linux/debian-cve-2026-42497.md) | May 26, 2026 |
| Linux | perl Debian 14 | 5.42.3-1 | [DEBIAN-CVE-2026-42497](https://patchblox.com/security/data/fix/linux/debian-cve-2026-42497.md) | May 26, 2026 |
| Linux | perl Ubuntu 24.04.5 LTS (noble) | 5.38.2-3.2ubuntu0.3 | [perl 5.38.2-3.2ubuntu0.3](https://patchblox.com/security/data/fix/linux/ubuntu-noble-perl-5.38.2-3.2ubuntu0.3.md) | May 25, 2026 |
| Linux | perl-Archive-Tar amzn 2023 | 3.04-522.amzn2023.0.3 | [ALAS2023-2026-1805](https://patchblox.com/security/data/fix/linux/alas2023-2026-1805.md) | Jun 8, 2026 |
| Linux | perl-Archive-Tar-tests amzn 2023 | 3.04-522.amzn2023.0.3 | [ALAS2023-2026-1805](https://patchblox.com/security/data/fix/linux/alas2023-2026-1805.md) | Jun 8, 2026 |
| Linux | perl-base Ubuntu 24.04.5 LTS (noble) | 5.38.2-3.2ubuntu0.3 | [perl-base 5.38.2-3.2ubuntu0.3](https://patchblox.com/security/data/fix/linux/ubuntu-noble-perl-base-5.38.2-3.2ubuntu0.3.md) | May 25, 2026 |
| Linux | perl-debug Ubuntu 24.04.5 LTS (noble) | 5.38.2-3.2ubuntu0.3 | [perl-debug 5.38.2-3.2ubuntu0.3](https://patchblox.com/security/data/fix/linux/ubuntu-noble-perl-debug-5.38.2-3.2ubuntu0.3.md) | May 25, 2026 |
| Linux | perl-modules-5.38 Ubuntu 24.04.5 LTS (noble) | 5.38.2-3.2ubuntu0.3 | [perl-modules-5.38 5.38.2-3.2ubuntu0.3](https://patchblox.com/security/data/fix/linux/ubuntu-noble-perl-modules-5.38-5.38.2-3.2ubuntu0.3.md) | May 25, 2026 |

---

Data as of 2026-11-08T00:53:09Z UTC. Source: Patchblox Patch Radar (https://patchblox.com/security/patch-radar). Patchblox finds out-of-date software on Windows, macOS and Linux and updates it through release rings: https://patchblox.com/demo

Free to use with attribution: show "Data: Patchblox Patch Radar" with a link to https://patchblox.com/security/patch-radar. Terms, including what needs a written agreement: https://patchblox.com/security/patch-radar/use-the-data

Product names, logos and trademarks shown on Patch Radar belong to their respective owners. They are used only to identify the software each security fix applies to and to help readers find their platform. Their use does not imply any affiliation with, or endorsement by, those owners, and Patchblox is not affiliated with any of them.
