CVE-2026-42496 Details
Description
Archive::Tar versions before 3.08 for Perl extract symlinks with attacker controlled targets outside the extraction directory. _make_special_file() passes the tar header's linkname to symlink() without validating it against absolute paths or .. segments. The secure-extract mode check that guards regular file extraction does not cover the symlink target. A subsequent open through the extracted name reads or writes the attacker chosen path.
A vulnerability exists in Archive::Tar versions prior to 3.08 for Perl, where the library extracts symlinks and hardlinks to attacker-controlled targets outside the extraction directory. The issue arises because the '_make_special_file()' function passes the tar header's linkname to the symlink() or link() functions without validating it against absolute paths or directory traversal segments. This flaw allows the creation of symlinks or hardlinks that can be exploited to read from or write to arbitrary locations on the filesystem. While the 'secure-extract' mode prevents regular files from being extracted to sylinked directories, it does not apply the same restrictions to symlink or hardlink targets, leaving a gap that can be exploited.
Users can upgrade to Archive::Tar version 3.08 or later, where this vulnerability has been addressed.
Metrics
CVSS 4.0 Severity and Vector Strings:
No CVSS 4.0 data is available for this CVE.
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
CISA-ADP
Assessed May 28, 2026References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://access.redhat.com/errata/RHSA-2026:30851 | redhat-SADP | |
| https://access.redhat.com/errata/RHSA-2026:30852 | redhat-SADP | |
| https://access.redhat.com/errata/RHSA-2026:30856 | redhat-SADP | |
| https://access.redhat.com/errata/RHSA-2026:30857 | redhat-SADP | |
| https://access.redhat.com/security/cve/CVE-2026-42496 | redhat-SADP | |
| https://bugzilla.redhat.com/show_bug.cgi?id=2481314 | redhat-SADP | |
| https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-42496.json | redhat-SADP | |
| https://github.com/jib/archive-tar-new/commit/17c873492a05eddc0de18c1485e0b2cccd5a9158.patch | CPANSec | Patch |
| https://metacpan.org/release/BINGOS/Archive-Tar-3.08/changes | CPANSec | Release Notes |
| https://www.cve.org/CVERecord?id=CVE-2026-42497 | CPANSec | Third Party Advisory |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-22 | Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') | redhat-SADP |
| CWE-59 | Improper Link Resolution Before File Access ('Link Following') | CPANSec |
Affected Products
| Product | Versions |
|---|---|
| archive::tar project archive::tar | < 3.08 |
CPE
Remediation
| |
Change History
8 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jul 24, 2026 | CVE Translated | [email protected] |
| Jul 15, 2026 | CVE Modified | redhat-SADP |
| Jun 30, 2026 | CVE Modified | redhat-SADP |
| Jun 17, 2026 | CVE Modified | CPANSec |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| May 28, 2026 | CVE Modified | CISA-ADP |
| May 27, 2026 | Initial Analysis | [email protected] |
| May 26, 2026 | New CVE Received | CPANSec |